Before you write to Flash or EEPROM

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

cross mob
Anonymous
Not applicable

One of our customer had a query regarding writing into flash. I thought reply sent to him can be put out in the forum which will be of help.

   

Whenever you have to make changes into the flash or write into flash following are to be done before you can call CyWriteRowData() function.

   

You must acquire the die temperature at least once to use Flash and EEPROM write functions.The die temperature is obtained by calling the CySetTemp() function. This function queries SPC for the die temperature and stores it in a global variable, which is used while performing Flash and EEPROM write operations.

   

If the Enable ECC option is disabled, you also need to allocate the buffer and pass it into the CySetFlashEEBuffer(uint8 *buffer) function. This buffer is used to store intermediate data while communicating with the SPC. buffer should be of length 256 + 32 = 288 where 256 refers to width of flash rom and 32 ECC bytes.

   

The description is detailed in the Flash and EEPROM section of System Refernce Guide.

0 Likes
0 Replies