Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

PSoC™ 5, 3 & 1 Forum Discussions

niprc_2224616
Level 2
Level 2
Welcome!

Hi,

I have been working with the PSoC 5LP for a little over a year now and I am still impressed by the shortcuts/capabilities available in the PSoC peripherals.  I have also noticed that every time I post a question, there are always more elegant solutions than I have come up with.  For that reason, I am asking this question for someone like Bob who I see in most posts I read in the forums.

At this time I am able to store serial numbers, model numbers, etc in external EEPROM and access this data from either program A/ program B using an external interface.  I wanted to take this a step further and eliminate the EEPROM and designate a section of flash on the PSoC5LP (separate from the bootloader, yet reserved apart from program A B).  This way, I can bootload programs A and B while preserving the stored serial numbers, model numbers, etc.

I have been testing this by including an EEPROM module in the bootloader and then writing the data to storage.  At this point, I am running into an issue where I have a barrier between the bootloader and each program that is bootloaded.  I cannot relay the address for the data to a program so that each program can relay the stored information to the host system.

I am aware of https://www.cypress.com/knowledge-base-article/using-emulated-eeprom-component-bootloadable-project-...  , However, I would like to retain validation for long life fielded units.  Skipping validation removes some of the benefits of dual bootloading..

Is there an easy way to do this?

Thank you,

Nick

0 Likes
1 Solution

Nick,

PSoC5 provides two different components: real EEPROM and Emulated EEPROM. The first one provides access to the physical EEPROM  (2kb), the second one - to the Flash memory. KBA89149 deals with Emulated EEPROM. Custom component "myEEPROM" uses real EEPROM, which should not affect the bootloader checksum.

/odissey1

View solution in original post

0 Likes
6 Replies
odissey1
Level 9
Level 9
First comment on KBA 1000 replies posted 750 replies posted

Nick,

Check this component for saving parameters into PSoC5 EEPROM (2kb). It allows for separate start addresses used in different applications, so can keep settings for both programs, but I never used it with a bootloader, so can't comment on that.

myEEPROM: component to save/recall application settings in EEPROM between power offs

/odissey1

0 Likes

Odissey1,

I am not sure you read the problem completely.  EEPROM could be used in individual applications as well as the boot application.  My problem is bridging the two without sacrificing an individual applications' checksum.  If you include this component within a bootloadable application and modify flash, that program will appear corrupted to the bootloader unless you disable verification.

Including the EEPROM component within the bootloader itself appears to be the answer, but how would the bootloader communicate flash addresses to the bootloadable program itself so that the bootloadable could read flash allocated to the bootloader (i.e. program A and program B flash are untouched and still verifiable.)?

-Nick

0 Likes

Nick,

I have limited knowledge of bootloader, but EEPROM does not use Flash, which gives hope that it might work. I would try to simply make two programs (use original. demo and set different offsets) and see if they work with bootloader.

/odissey1

0 Likes

Odissey1,

It was my understanding through KBA89149 that the EEPROM component emulates EEPROM by using flash in an application.

If I make a bootloadable with EEPROM and write to said EEPROM, my host skips program due to checksum failure.  That got me to thinking though..  If I create an EEPROM component in the bootloader application, I could read back the address, then use a copy of those functions in the bootloadables to read the information in the bootloadable applications.  I am going to play around with that and see if a good answer is there and repeatable.  If the flash allocation from bootloader to bootloader is deterministic, we could set the flash addresses as constants in the bootloadable application and access those inactive flash addresses (inactive to the bootloadable).

If this works, I will try to post a solution.

Nick

0 Likes

Nick,

PSoC5 provides two different components: real EEPROM and Emulated EEPROM. The first one provides access to the physical EEPROM  (2kb), the second one - to the Flash memory. KBA89149 deals with Emulated EEPROM. Custom component "myEEPROM" uses real EEPROM, which should not affect the bootloader checksum.

/odissey1

0 Likes

Ok.  I will try that.

This is where I am getting picky.  I want to do the dual bootload plus EEPROM where each application has access.  I will fudge around with it a little bit and see what happens.

Nick

0 Likes