Skip to content

Commit 72aa990

Browse files
committed
Pull request #9: data_eeprom_emulation : Release v1.0.2
Merge in MCU16CE/dspic33a-curiosity-data-eeprom-emulation-demo from develop to main * commit '7f058e44855ab8656e4a8c37e1b972d425690ee2': MCU16GITHUB-1237 Updated demo to use latest ganarated code
2 parents 6af84f8 + 7f058e4 commit 72aa990

36 files changed

+150
-113
lines changed

.main-meta/main.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"content":{
55
"metaDataVersion":"1.3.0",
66
"name":"com.microchip.mplabx.project.dspic33a-curiosity-data-eeprom-emulation-demo",
7-
"version":"1.0.1",
7+
"version":"1.0.2",
88
"displayName":"dsPIC33A Curiosity Data EEPROM Emulation Demo",
99
"projectName":"dspic33a-curiosity-data-eeprom-emulation-demo",
1010
"shortDescription":"dsPIC33A Curiosity Data EEPROM Emulation Demo",

changelog.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# dspic33a-curiosity-data-eeprom-emulation-demo v1.0.2
2+
### Release Highlights
3+
4+
Patch release to to use the latest DEE library generated code.
5+
6+
### Features Added\Updated
17
# dspic33a-curiosity-data-eeprom-emulation-demo v1.0.1
28
### Release Highlights
39

dspic33a-curiosity-dee-demo/dspic33a-curiosity-dee-demo.X/dspic33a-curiosity-dee-demo.mc3

Lines changed: 38 additions & 34 deletions
Large diffs are not rendered by default.

dspic33a-curiosity-dee-demo/dspic33a-curiosity-dee-demo.X/main.c

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
© [2024] Microchip Technology Inc. and its subsidiaries.
2+
© [2025] Microchip Technology Inc. and its subsidiaries.
33
44
Subject to your compliance with these terms, you may use Microchip
55
software and any derivatives exclusively with Microchip products.
@@ -26,36 +26,41 @@
2626
/*
2727
Main application
2828
*/
29-
30-
#define LOOPCOUNT 1024
29+
#define NORMAL "\x0F\x1B[0m\033[0m" // Cancels any active formatting modes and returns to a default font face
30+
#define RED "\033[0;31m" // Selects red font face
31+
#define GREEN "\033[0;32m" // Selects green font face
32+
#define LOOPCOUNT 1200
33+
#define DATA 0x12345678
3134

3235
int main(void) {
3336
int addr0 = 0, addr1 = 1, addr2 = 2, i;
3437
uint32_t valueAtAddr0 = 0;
3538
uint32_t valueAtAddr1 = 0;
3639
uint32_t valueAtAddr2 = 0;
37-
uint32_t expectedValueAtAddr0 = LOOPCOUNT;
38-
uint32_t expectedValueAtAddr1 = LOOPCOUNT+1;
39-
uint32_t expectedValueAtAddr2 = LOOPCOUNT+5;
40+
uint32_t expectedValueAtAddr0 = DATA+LOOPCOUNT;
41+
uint32_t expectedValueAtAddr1 = DATA+LOOPCOUNT+1;
42+
uint32_t expectedValueAtAddr2 = DATA+LOOPCOUNT+2;
4043

4144
SYSTEM_Initialize();
42-
printf("Data EEPROM Emulation is in progress...\r\n");
45+
printf(NORMAL"Data EEPROM Emulation is in progress...\r\n");
4346
DEE_Init();
4447

4548
for (i = 0; i < LOOPCOUNT; i++) {
46-
DEE_Write(addr0, i + 1);
47-
DEE_Write(addr1, i + 2);
48-
DEE_Write(addr2, i + 3);
49+
DEE_Write(addr0, DATA + i + 1);
50+
DEE_Write(addr1, DATA + i + 2);
51+
DEE_Write(addr2, DATA + i + 3);
4952
}
5053

5154
DEE_Read(addr0, &valueAtAddr0);
5255
DEE_Read(addr1, &valueAtAddr1);
5356
DEE_Read(addr2, &valueAtAddr2);
5457

5558
if (valueAtAddr0 == expectedValueAtAddr0 && valueAtAddr1 == expectedValueAtAddr1 && valueAtAddr2 == expectedValueAtAddr2) {
56-
printf("Data EEPROM Emulation successful.\r\n Value at address 0 is %ld\r\n Value at address 1 is %ld \r\n Value at address 2 is %ld \r\n", valueAtAddr0, valueAtAddr1, valueAtAddr2);
59+
printf(GREEN"Data EEPROM Emulation successful.\r\n");
60+
printf(NORMAL" Value at address 0 is 0x%X \r\n Value at address 1 is 0x%X \r\n Value at address 2 is 0x%X \r\n", valueAtAddr0, valueAtAddr1, valueAtAddr2);
5761
} else {
58-
printf("Data EEPROM Emulation failed.\r\n Value at address 0 is %ld\r\n Value at address 1 is %ld \r\n Value at address 2 is %ld \r\n", valueAtAddr0, valueAtAddr1, valueAtAddr2);
62+
printf(RED"Data EEPROM Emulation failed.\r\n");
63+
printf(NORMAL" Value at address 0 is 0x%X \r\n Value at address 1 is 0x%X \r\n Value at address 2 is 0x%X \r\n", valueAtAddr0, valueAtAddr1, valueAtAddr2);
5964
}
6065
while(1);
6166
return 0;

dspic33a-curiosity-dee-demo/dspic33a-curiosity-dee-demo.X/mcc-manifest-autosave.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
manifest_file_version: 1.0.0
44
project: dspic33a-curiosity-dee-demo
5-
creation_date: 2024-10-21T12:38:41.157+05:30[Asia/Calcutta]
5+
creation_date: 2025-02-07T12:06:36.529+05:30[Asia/Calcutta]
66
operating_system: Windows 10
77
mcc_mode: IDE
88
mcc_mode_version: v6.20
@@ -12,25 +12,25 @@ mcc_version: 5.5.1
1212
mcc_core_version: 5.7.1
1313
content_manager_version: 5.0.1
1414
is_mcc_offline: false
15-
is_using_prerelease_versions: true
15+
is_using_prerelease_versions: false
1616
mcc_content_registries: https://registry.npmjs.org/
1717
device_library: {library_class: com.microchip.mcc.melody.Library, name: Melody, version: 2.8.0}
18-
packs: {name: dsPIC33AK-MC_DFP, version: 1.0.33}
18+
packs: {name: dsPIC33AK-MC_DFP, version: 1.1.94}
1919
modules:
20-
- {name: '@mchp-mcc/data-eeprom-emulation', type: MELODY, version: 1.0.0}
20+
- {name: '@mchp-mcc/data-eeprom-emulation', type: MELODY, version: 1.0.1}
2121
- {name: '@mchp-mcc/dmt-16bit-driver', type: MELODY, version: 1.0.7}
2222
- {name: '@mchp-mcc/dspic33a-clock', type: MELODY, version: 1.1.0}
2323
- {name: '@mchp-mcc/dspic33a-configuration-bits', type: MELODY, version: 1.0.1}
2424
- {name: '@mchp-mcc/dspic33a-dmt', type: MELODY, version: 1.0.1}
25-
- {name: '@mchp-mcc/dspic33a-flash', type: MELODY, version: 1.0.1}
26-
- {name: '@mchp-mcc/dspic33a-interrupt', type: MELODY, version: 1.0.1}
25+
- {name: '@mchp-mcc/dspic33a-flash', type: MELODY, version: 1.0.2}
26+
- {name: '@mchp-mcc/dspic33a-interrupt', type: MELODY, version: 1.1.0}
2727
- {name: '@mchp-mcc/dspic33a-pac', type: MELODY, version: 1.0.1}
2828
- {name: '@mchp-mcc/dspic33a-pin-manager', type: MELODY, version: 1.0.1}
2929
- {name: '@mchp-mcc/dspic33a-reset', type: MELODY, version: 1.0.1}
3030
- {name: '@mchp-mcc/dspic33a-uart', type: MELODY, version: 1.0.1}
3131
- {name: '@mchp-mcc/dspic33a-wdt', type: MELODY, version: 1.0.1}
3232
- {name: '@mchp-mcc/main-16bit-manager', type: MELODY, version: 1.1.3}
33-
- {name: '@mchp-mcc/pic-16bit', type: MELODY, version: 5.12.3}
33+
- {name: '@mchp-mcc/pic-16bit', type: MELODY, version: 5.12.4}
3434
- {name: '@mchp-mcc/pin-content-processor', type: MELODY, version: 3.9.0}
3535
- {name: '@mchp-mcc/uart-driver', type: MELODY, version: 1.10.2}
3636
- {name: '@mchp-mcc/wdt-16bit-driver', type: MELODY, version: 1.0.9}
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# This file has been autogenerated by MPLAB Code Configurator. Please do not edit this file.
22

33
manifest_file_version: 1.0.0
4-
project: dspic33ak-curiosity-dee-demo
5-
creation_date: 2024-10-21T10:43:26.774+05:30[Asia/Calcutta]
4+
project: dspic33a-curiosity-dee-demo
5+
creation_date: 2025-02-07T12:06:36.507+05:30[Asia/Calcutta]
66
operating_system: Windows 10
77
mcc_mode: IDE
88
mcc_mode_version: v6.20
@@ -12,25 +12,25 @@ mcc_version: 5.5.1
1212
mcc_core_version: 5.7.1
1313
content_manager_version: 5.0.1
1414
is_mcc_offline: false
15-
is_using_prerelease_versions: true
15+
is_using_prerelease_versions: false
1616
mcc_content_registries: https://registry.npmjs.org/
1717
device_library: {library_class: com.microchip.mcc.melody.Library, name: Melody, version: 2.8.0}
18-
packs: {name: dsPIC33AK-MC_DFP, version: 1.0.33}
18+
packs: {name: dsPIC33AK-MC_DFP, version: 1.1.94}
1919
modules:
20-
- {name: '@mchp-mcc/data-eeprom-emulation', type: MELODY, version: 1.0.0}
20+
- {name: '@mchp-mcc/data-eeprom-emulation', type: MELODY, version: 1.0.1}
2121
- {name: '@mchp-mcc/dmt-16bit-driver', type: MELODY, version: 1.0.7}
2222
- {name: '@mchp-mcc/dspic33a-clock', type: MELODY, version: 1.1.0}
2323
- {name: '@mchp-mcc/dspic33a-configuration-bits', type: MELODY, version: 1.0.1}
2424
- {name: '@mchp-mcc/dspic33a-dmt', type: MELODY, version: 1.0.1}
25-
- {name: '@mchp-mcc/dspic33a-flash', type: MELODY, version: 1.0.1}
26-
- {name: '@mchp-mcc/dspic33a-interrupt', type: MELODY, version: 1.0.1}
25+
- {name: '@mchp-mcc/dspic33a-flash', type: MELODY, version: 1.0.2}
26+
- {name: '@mchp-mcc/dspic33a-interrupt', type: MELODY, version: 1.1.0}
2727
- {name: '@mchp-mcc/dspic33a-pac', type: MELODY, version: 1.0.1}
2828
- {name: '@mchp-mcc/dspic33a-pin-manager', type: MELODY, version: 1.0.1}
2929
- {name: '@mchp-mcc/dspic33a-reset', type: MELODY, version: 1.0.1}
3030
- {name: '@mchp-mcc/dspic33a-uart', type: MELODY, version: 1.0.1}
3131
- {name: '@mchp-mcc/dspic33a-wdt', type: MELODY, version: 1.0.1}
3232
- {name: '@mchp-mcc/main-16bit-manager', type: MELODY, version: 1.1.3}
33-
- {name: '@mchp-mcc/pic-16bit', type: MELODY, version: 5.12.3}
33+
- {name: '@mchp-mcc/pic-16bit', type: MELODY, version: 5.12.4}
3434
- {name: '@mchp-mcc/pin-content-processor', type: MELODY, version: 3.9.0}
3535
- {name: '@mchp-mcc/uart-driver', type: MELODY, version: 1.10.2}
3636
- {name: '@mchp-mcc/wdt-16bit-driver', type: MELODY, version: 1.0.9}

dspic33a-curiosity-dee-demo/dspic33a-curiosity-dee-demo.X/mcc_generated_files/dee/src/dee.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
© [2024] Microchip Technology Inc. and its subsidiaries.
2+
© [2025] Microchip Technology Inc. and its subsidiaries.
33
44
Subject to your compliance with these terms, you may use Microchip
55
software and any derivatives exclusively with Microchip products.
@@ -266,7 +266,7 @@ DEE_RETURN_STATUS DEE_Write(uint16_t addr, uint32_t data)
266266
uint16_t currentPage;
267267
uint32_t pageAddress; //Current array (page) offset of selected element (PM 16-bit word)
268268
uint16_t nextLoc;
269-
volatile uint16_t latchData;
269+
volatile uint32_t latchData;
270270
volatile uint8_t latchAddr;
271271
uint8_t dataEEFlags_sh;
272272
uint16_t bank;
@@ -369,7 +369,7 @@ DEE_RETURN_STATUS DEE_Write(uint16_t addr, uint32_t data)
369369
}
370370

371371
//Pack if page is full
372-
if ((nextLoc + ADDRESS_INC_FACTOR) >= ((NUMBER_OF_INSTRUCTIONS_IN_PAGE * WORD_WRITE_SIZE)))
372+
if ((nextLoc + ADDRESS_INC_FACTOR) == ((NUMBER_OF_INSTRUCTIONS_IN_PAGE * WORD_WRITE_SIZE)))
373373
{
374374
status = DEE_Pack(bank);
375375
}

dspic33a-curiosity-dee-demo/dspic33a-curiosity-dee-demo.X/mcc_generated_files/flash/flash.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*
1111
* @skipline @version Firmware Driver Version 1.0.0
1212
*
13-
* @skipline @version PLIB Version 1.0.1
13+
* @skipline @version PLIB Version 1.0.2
1414
*
1515
* @skipline Device : dsPIC33AK128MC106
1616
*/

dspic33a-curiosity-dee-demo/dspic33a-curiosity-dee-demo.X/mcc_generated_files/flash/flash_interface.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*
1111
* @skipline @version Firmware Driver Version 1.1.0
1212
*
13-
* @skipline @version PLIB Version 1.0.1
13+
* @skipline @version PLIB Version 1.0.2
1414
*
1515
* @skipline Device : dsPIC33AK128MC106
1616
*/

dspic33a-curiosity-dee-demo/dspic33a-curiosity-dee-demo.X/mcc_generated_files/flash/flash_types.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*
1111
* @skipline @version Firmware Driver Version 1.0.0
1212
*
13-
* @skipline @version PLIB Version 1.0.1
13+
* @skipline @version PLIB Version 1.0.2
1414
*
1515
* @skipline Device : dsPIC33AK128MC106
1616
*/
@@ -53,7 +53,7 @@
5353
@ingroup flashdriver
5454
@brief Defines FLASH erase page mask
5555
*/
56-
#define FLASH_ERASE_PAGE_MASK (~(FLASH_ERASE_PAGE_SIZE_IN_INSTRUCTIONS - 1U))
56+
#define FLASH_ERASE_PAGE_MASK (~((FLASH_ERASE_PAGE_SIZE_IN_INSTRUCTIONS * 4U) - 1U))
5757

5858
typedef void (*FLASH_CALLBACK)(void *);
5959

0 commit comments

Comments
 (0)