read/write flash

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

cross mob
Anonymous
Not applicable

My understanding is that  CySysFlashWriteRow API can be used to write data to flash 

   

However it's not clear how to programmatically determine the row number where application data can be written

   

What's the recommended way?

   

This is for CYBLE 022001-00 

   

Thank you 

0 Likes
1 Solution
Anonymous
Not applicable

Answering my own question:CyBle_StoreAppData API works fine for me

   

Here is the link 

   

http://www.cypress.com/forum/psoc-4-ble/how-store-byte-array-flash-memory

View solution in original post

0 Likes
2 Replies
Anonymous
Not applicable

If you have declared the variable as a constant, then the compiler should be placing it in flash. Then, all you have to do is get the address of the variable (using a reference) to get the flash address that you want to update 🙂

   

I don't remember how the row reference calculations work out, but iirc the cypress write flash api should be doing the row calculations internally, and all you have to do is supply it with an address, data pointer, and data length?

   

Here's some threads that contains multiple flash examples fyi:

   

http://www.cypress.com/forum/psoc-4-ble/how-do-you-store-psuedo-random-number-flash

   

http://www.cypress.com/forum/proc-ble/supervisory-flash-write

0 Likes
Anonymous
Not applicable

Answering my own question:CyBle_StoreAppData API works fine for me

   

Here is the link 

   

http://www.cypress.com/forum/psoc-4-ble/how-store-byte-array-flash-memory

0 Likes