Skip to content

Commit aa52628

Browse files
committed
Pull request #10: DEE Demo Release 1.1.0
Merge in MCU16CE/dspic33ck-curiosity-data-eeprom-emulation-demo from develop to master * commit '038249012d82fc7e8fa06a7e2195db6c57e3281d': removed redundant information fixed typo Addressed review comments Added information regarding the DEE size constraint if hot swap is required Addressed review comments , added details to readme Addressed review comments Fixed typos Updated libraries to latest verions updated metadata Updated project Dual panel project added updated jenkinsfile
2 parents 5fa710c + 0382490 commit aa52628

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+13977
-20
lines changed

.citd/Jenkinsfilek8s

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ pipeline {
5454
MPLABX_PROJECT_SOURCE = "../"
5555
}
5656

57+
triggers {
58+
cron(env.BRANCH_NAME == 'develop' ? 'H H 1 * *': '')
59+
}
5760
options {
5861
timestamps()
5962
timeout(time: 20, unit: 'MINUTES')

.main-meta/main.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"content": {
55
"metaDataVersion": "1.3.0",
66
"name": "com.microchip.mplabx.project.dspic33ck-curiosity-data-eeprom-emulation-demo",
7-
"version": "1.0.1",
7+
"version": "1.1.0",
88
"displayName": "dsPIC33CK Curiosity Data EEPROM Emulation Demo",
99
"projectName": "dspic33ck-curiosity-data-eeprom-emulation-demo",
1010
"shortDescription": "dsPIC33CK Curiosity Data EEPROM Emulation Demo",
1111
"ide": {
1212
"name": "MPLABX",
13-
"semverRange": ">=6.0.0"
13+
"semverRange": ">=6.15.0"
1414
},
1515
"compiler": {
1616
"name": "XC16",

README.md

Lines changed: 42 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
![image](images/microchip.jpg)
1+
![image](images/microchip.jpg)
22

33
## dsPIC33CK Curiosity Data EEPROM Emulation Demo
44

@@ -10,23 +10,23 @@ Microchip Technology Inc., has expanded its product portfolio to include a wide
1010
Many applications store nonvolatile information in the Flash program memory using table read and write operations. Applications that need to frequently update these data may have greater endurance requirements
1111
than the specified Flash endurance for the MCU/Digital Signal Controller (DSC) devices.
1212

13-
The alternate solution of using an external, serial EEPROM device may not be appropriate for cost-sensitive or pin-constrained applications.
13+
The alternate solution of using an external, serial EEPROM device may not be appropriate for cost-sensitive or pin-constrained applications.
1414

1515
This 16-Bit Data EEPROM Emulation library presents a third alternative that addresses these issues. This library features an interface similar to an internal data EEPROM, which
1616
uses available program memory and can improve endurance by a factor as high as 500.
1717

18-
This code example demonstrate the usage of 16-Bit Data EEPROM Emulation Library.
18+
This code example demonstrates the usage of 16-Bit Data EEPROM Emulation Library.
1919

2020
## Related Documentation
2121

2222
- dsPIC33CK256MP508 microcontroller (https://www.microchip.com/dsPIC33CK256MP508)
2323
- Emulating Data EEPROM for PIC18 and PIC24 MCUs and dsPIC33 DSCs (https://www.microchip.com/en-us/application-notes/an1095)
2424

2525

26-
## Software Used
26+
## Software Used
2727

28-
- MPLAB® X IDE v6.00 or newer (https://www.microchip.com/mplabx)
29-
- MPLAB® XC16 v2.00 or newer (https://www.microchip.com/xc)
28+
- MPLAB® X IDE v6.15 or newer (https://www.microchip.com/mplabx)
29+
- MPLAB® XC16 v2.00 or newer (https://www.microchip.com/xc)
3030
- Any of the serial terminal application. Example: Tera Term (https://ttssh2.osdn.jp/index.html.en)
3131
- 16-bit Data EEPROM Emulation Library (DEE) for PIC24 MCUs and dsPIC33 DSCs (https://www.microchip.com/en-us/software-library/16-bit_data_eeprom_emulation)
3232

@@ -36,23 +36,50 @@ This code example demonstrate the usage of 16-Bit Data EEPROM Emulation Library.
3636
- dsPIC33CK Curiosity Development Board (https://www.microchip.com/DM330030)
3737
- Micro USB Cable
3838

39-
39+
**Note:** The word panel and partition means the same thing and used interchangeably in this document.
4040

4141
## Operation
42+
There are 2 examples in this repository. Example1 uses single panel and Example2 demonstrates dual panel capability of DEE.
43+
Using dual panel is useful to not cause CPU execution stall during the normal runtime mode when the applications uses the DEE, which would be stored in the inactive partition.
4244

43-
This demo runs the Data EEPROM Emulation , if emulation is succesful then prints a message saying "Data EEPROM Emulation successful. Value at address 0 is 1024 and address1 is 1025"
44-
If emulation fails it prints a message saying "Data EEPROM Emulation failed".
45+
## Example1:
46+
This demo runs the Data EEPROM Emulation , if emulation is successful then prints a message to the serial terminal saying "Data EEPROM Emulation successful. Value at address 0 is 1024 and address1 is 1025"
47+
If emulation fails it prints a message to the serial terminal saying "Data EEPROM Emulation failed".
4548

46-
## Accessing 16-Bit Data EEPROM Emulation Library
49+
## Example2:
50+
There are 2 MPLABX projects under folder "dspic33ck-curiosity-dual-panel-dee-demo". One project for programming the first partition another for programming the second partition.
4751

48-
*Note:* More MCC Melody devices support will be added in future releases.
52+
In a typical field scenario, boot-loader will help to do a live update i.e. boot-loader will help to download the new application to the secondary
53+
partition and this new application will be configured such that on reboot, application in secondary partition will execute(secondary partition
54+
becomes primary or active partition).
4955

50-
| Device Family | Procedure |
51-
| ----------- | ----------- |
52-
| "CK" Family of devices| 1. Create project <br> 2. Launch MCC <br> 3. Select "MCC Melody" <br> <img src="images/melodySelection.jpg" width="600"> <br> 4. "16-Bit Data EEPROM Emulation Library "will be available under "Libraries" <br> <img src="images/DEEMelody.jpg" width="600"> |
53-
| All other devices except "CK" device family | 1. Make sure https://ww1.microchip.com/downloads/en/DeviceDoc/script-1.29.3.mc3lib is installed <br> 2. Create project <br> 3. Launch MCC <br> 4. Select "Classic MCC" <br> <img src="images/classicSelection.jpg" width="600"><br> 5. Switch core version to "5.2.1" <br> <img src="images/coreSwitch.jpg" width="600"> <br> 6. "16-Bit Data EEPROM Emulation Library" will be available under "Libraries" <br> <img src="images/DEEClassic.jpg" width="600"> |
56+
If we want to program both the partitions of the microcontroller, MPLABX provides an option to create an unified hex file for programming both program memory partitions with different applications. In order to do that users have to configure one MPLABX project with XC16(Global Options) ->Partition as "Partition One/Active" and another MPLABX project with XC16(Global Options) ->Partition as "Partition Two/Inactive". Then second MPLABX project needs to be linked to first MPLABX project as loadable as shown below.
57+
58+
![image](images/projectConfig.jpg)
59+
60+
The projects in this example are already linked so that when dee-dual-panel-demo-partition1.X is built and programmed, it programs both the partitions.
61+
62+
After programming, the application in the first partition(active partition) will execute and DEE library will use the inactive partition(second partition) to store the DEE data. User will see the following data on the serial terminal on successful emulation,
5463

64+
![image](images/partition1.jpg)
5565

66+
After some time, once the emulation is completed and output is displayed, user has to reset the board. The application in the first partition, configures the configuration bits BSEQ and IBSEQ in the second partition, such that on reset second partition becomes the active partition. On resetting the board
67+
application in the second partition will execute. DEE Library will check if there is any data available in the active partition from the previous iteration, if so it copies the data to the inactive partition(first partition), delete the previous iteration data from the active partition and continue with the emulation.
5668

69+
The following data will be displayed on successful emulation.
5770

71+
![image](images/partition2.jpg)
72+
73+
## Important Note
74+
If there is no requirement for partition switching, the entire second partition(inactive partition) can be used for storing the DEE data. If partition switching is required make sure that free space in executable partition(active partition) is larger than the required DEE data structure size.
75+
76+
## Accessing 16-Bit Data EEPROM Emulation Library
77+
78+
*Note:* More MCC Melody devices support will be added in future releases.
79+
80+
| Device Family | Procedure |
81+
| ----------- | ----------- |
82+
| Devices supported on Melody| 1. Create project <br> 2. Launch MCC <br> 3. Select "MCC Melody" <br> <img src="images/melodySelection.jpg" width="600"> <br> 4. "16-Bit Data EEPROM Emulation Library "will be available under "Libraries" <br> <img src="images/DEEMelody.jpg" width="600"> |
83+
| Devices not supported on Melody | 1. Make sure https://ww1.microchip.com/downloads/en/DeviceDoc/script-1.29.3.mc3lib is installed <br> 2. Create project <br> 3. Launch MCC <br> 4. Select "Classic MCC" <br> <img src="images/classicSelection.jpg" width="600"><br> 5. Switch core version to "5.2.1" <br> <img src="images/coreSwitch.jpg" width="600"> <br> 6. "16-Bit Data EEPROM Emulation Library" will be available under "Libraries" <br> <img src="images/DEEClassic.jpg" width="600"> |
5884

85+
For more information refer: https://www.microchip.com/en-us/software-library/dspic33-pic24-data-eeprom-emulation

changelog.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
# 16-Bit Data EEPROM Emulation Demo v1.1.0
2+
### Release Highlights
3+
4+
Added an example project to demonstrate Dual Panel capability of Data EEPROM Emulation Library.
5+
6+
### Features Added\Updated
7+
8+
New example demonstrating dual panel capability of Data EEPROM Emulation Library is added.
9+
10+
111
# 16-Bit Data EEPROM Emulation Demo v1.0.1
212
### Release Highlights
313

@@ -10,6 +20,3 @@ Updated the demo to use the latest version of Melody
1020
Initial release of 16-Bit Data EEPROM Emulation Demo
1121

1222
### Features Added\Updated
13-
14-
15-
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{
2+
"metaDataVersion": "1.0.0",
3+
"category": "com.microchip.ide.project",
4+
"content": {
5+
"metaDataVersion": "1.3.0",
6+
"name": "com.microchip.mplabx.project.dspic33ck-curiosity-dual-panel-data-eeprom-emulation-demo",
7+
"version": "1.0.0",
8+
"displayName": "dsPIC33CK Curiosity Dual Partition Flash Data EEPROM Emulation Demo",
9+
"projectName": "dspic33ck-curiosity-dual-panel-data-eeprom-emulation-demo",
10+
"shortDescription": "dsPIC33CK Curiosity Dual Partition Flash Data EEPROM Emulation Demo",
11+
"ide": {
12+
"name": "MPLABX",
13+
"semverRange": ">=6.15.0"
14+
},
15+
"compiler": {
16+
"name": "XC16",
17+
"semverRange": "^2.0.0"
18+
},
19+
"dfp": {
20+
"name": "dsPIC33CK-MP_DFP",
21+
"semverRange": ">=1.6.176"
22+
},
23+
"configurator": {
24+
"name": "MCC",
25+
"semverRange": ">=5.1.1"
26+
},
27+
"device": {
28+
"metaDataVersion": "1.0.0",
29+
"category": "com.microchip.portal.contentRef",
30+
"content": {
31+
"metaDataVersion": "1.0.0",
32+
"category": "com.microchip.device",
33+
"name": "DSPIC33CK256MP508",
34+
"versionRange": "*"
35+
}
36+
},
37+
"peripherals": [
38+
"UART",
39+
"FLASH"
40+
],
41+
"keywords": [
42+
"EEPROM",
43+
"DEE",
44+
"Data EEPROM Emulation",
45+
"Dual Partition Flash"
46+
]
47+
}
48+
}
Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
#
2+
# There exist several targets which are by default empty and which can be
3+
# used for execution of your targets. These targets are usually executed
4+
# before and after some main targets. They are:
5+
#
6+
# .build-pre: called before 'build' target
7+
# .build-post: called after 'build' target
8+
# .clean-pre: called before 'clean' target
9+
# .clean-post: called after 'clean' target
10+
# .clobber-pre: called before 'clobber' target
11+
# .clobber-post: called after 'clobber' target
12+
# .all-pre: called before 'all' target
13+
# .all-post: called after 'all' target
14+
# .help-pre: called before 'help' target
15+
# .help-post: called after 'help' target
16+
#
17+
# Targets beginning with '.' are not intended to be called on their own.
18+
#
19+
# Main targets can be executed directly, and they are:
20+
#
21+
# build build a specific configuration
22+
# clean remove built files from a configuration
23+
# clobber remove all built files
24+
# all build all configurations
25+
# help print help mesage
26+
#
27+
# Targets .build-impl, .clean-impl, .clobber-impl, .all-impl, and
28+
# .help-impl are implemented in nbproject/makefile-impl.mk.
29+
#
30+
# Available make variables:
31+
#
32+
# CND_BASEDIR base directory for relative paths
33+
# CND_DISTDIR default top distribution directory (build artifacts)
34+
# CND_BUILDDIR default top build directory (object files, ...)
35+
# CONF name of current configuration
36+
# CND_ARTIFACT_DIR_${CONF} directory of build artifact (current configuration)
37+
# CND_ARTIFACT_NAME_${CONF} name of build artifact (current configuration)
38+
# CND_ARTIFACT_PATH_${CONF} path to build artifact (current configuration)
39+
# CND_PACKAGE_DIR_${CONF} directory of package (current configuration)
40+
# CND_PACKAGE_NAME_${CONF} name of package (current configuration)
41+
# CND_PACKAGE_PATH_${CONF} path to package (current configuration)
42+
#
43+
# NOCDDL
44+
45+
46+
# Environment
47+
MKDIR=mkdir
48+
CP=cp
49+
CCADMIN=CCadmin
50+
RANLIB=ranlib
51+
52+
53+
# build
54+
build: .build-post
55+
56+
.build-pre:
57+
# Add your pre 'build' code here...
58+
59+
.build-post: .build-impl
60+
# Add your post 'build' code here...
61+
62+
63+
# clean
64+
clean: .clean-post
65+
66+
.clean-pre:
67+
# Add your pre 'clean' code here...
68+
# WARNING: the IDE does not call this target since it takes a long time to
69+
# simply run make. Instead, the IDE removes the configuration directories
70+
# under build and dist directly without calling make.
71+
# This target is left here so people can do a clean when running a clean
72+
# outside the IDE.
73+
74+
.clean-post: .clean-impl
75+
# Add your post 'clean' code here...
76+
77+
78+
# clobber
79+
clobber: .clobber-post
80+
81+
.clobber-pre:
82+
# Add your pre 'clobber' code here...
83+
84+
.clobber-post: .clobber-impl
85+
# Add your post 'clobber' code here...
86+
87+
88+
# all
89+
all: .all-post
90+
91+
.all-pre:
92+
# Add your pre 'all' code here...
93+
94+
.all-post: .all-impl
95+
# Add your post 'all' code here...
96+
97+
98+
# help
99+
help: .help-post
100+
101+
.help-pre:
102+
# Add your pre 'help' code here...
103+
104+
.help-post: .help-impl
105+
# Add your post 'help' code here...
106+
107+
108+
109+
# include project implementation makefile
110+
include nbproject/Makefile-impl.mk
111+
112+
# include project make variables
113+
include nbproject/Makefile-variables.mk

0 commit comments

Comments
 (0)