- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I want to load data to the EEPROM of CY8c5868.
As I understand, it can be done with PSoC programmer.
s there an information how it is done, and the format of the file?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
GaSh,
In the PSoC5 there is a "EEPROM" tab in the DWR (Design Wide Resources). When you select the "Include EEPROM in Hex file" the EEPROM map shown below will be pushed into the EEPROM during programming time. Therefore with the map below, you can preload values in the EEPROM image at programming-time. During run-time, these value can be altered by the Application.
Is this what you are looking for?
Len
"Engineering is an Art. The Art of Compromise."
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
GaSh,
In the PSoC5 there is a "EEPROM" tab in the DWR (Design Wide Resources). When you select the "Include EEPROM in Hex file" the EEPROM map shown below will be pushed into the EEPROM during programming time. Therefore with the map below, you can preload values in the EEPROM image at programming-time. During run-time, these value can be altered by the Application.
Is this what you are looking for?
Len
"Engineering is an Art. The Art of Compromise."
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you.
According to this solution the initial data is defined before the compilation.
My customer wants to updata the data (e.g. serial number) before programming.
Is there a way to do it, without opening the source code, updating, compiling, and generating Hex file for each device?
Gal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello GaSh.
To answer your first question, the format of the file is Intel Hex format. You'll find a description in Appendix A:
https://www.cypress.com/file/119651/download
To write to EEPROM without re-compiling, there are several options.
1) Write a PERL/TCL/Python/etc script to modify the hex file that Creator generates.
2) Use a hex editor to enter the EEPROM values and save as Intel hex to a new file. Edit the Creator generated hex file and paste the new hex file generated from hex editor (at appropriate location of course).
3) Create a set of COM scripts to control Miniprog3 (or Kitprog). There are example scripts in the PSoC Programmer folder.
C:\Program Files\Cypress\Programmer\Examples\Programming\PSoC3_5\SWD\C_Sharp_EEPROM
Reference also Psoc Programmer CLI manual:
https://www.cypress.com/file/136431/download
4) Look at the scripts in 5LP Programming Spec for EEPROM programming, chapter 5.12. The low level commands are further described in 5LP Architecture TRM manual, chapter 41. https://www.cypress.com/file/123561/download
5) Could set up an i2C bridge with target 5LP and Miniprog3. Use MiniProg3 to send commands to target to write to EEPROM. This requires a bit of an app on target to interpret/execute the i2C commands.
6) Many-many other ways to do this.
The method Len mentioned works perfectly well. But yes, you have to recompile.
Depending on how many 5LP's will be programmed per day, will dictate how much effort goes into automating the EEPROM write process.
Good luck with your project.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you.
It is very helpfull.
Gal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
GaSh,
Did you know that Cypress provides a unique 64bit Silicon ID with each PSoC? If this can be used as a Serial number for your customer the code is very easy and doesn't require any EEPROM. uid = unique ID. I use this uid for my projects. It helps me identify which PCBA it is. Additionally Cypress uses the uid to identify which COM port number gets assigned when you plug into the USB port.
Code:
uint64_t uid;
CyGetUniqueId((uint32 *)&uid);
If your customer wants its own Serial number, there are ways to load the new Serial Number after programming and then look it down for preventing further modifications. It requires that the PSoC use some communication protocol (such as UART) with a hidden command to store a Serial number in EEPROM and then a command to lock it once written.
Len
"Engineering is an Art. The Art of Compromise."
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you.
We cannot use the Silicone ID.
Because of operational issues, we considering loading the number via UART, or in programming.
Gal