Welcome in the forum, Niklas!
The EmEEProm is not availlable for the BLE-chips because it infers with clock settings and interrupt availlability.
Only way out is to "put aside" some flash memory and use the CySysFlashWriteRow() API to store some data.
PS: Bei den Temperaturen gestern hab ich mich auch wie eine Bratwurst gefühlt.
ahhh thank you! :)
Ps: jaa ich wurde mit dem Namen gestern inspiriert :D
Read "System Reference Guide" (to find under "Help" in Creator). See memory organization. Use top of flash for your data, there are consts defined for number pf bytes in a row, number of rows etc. No additional #include needed.
I would suggest to define a structure as large as a flash row or less. you can tpedefr a pointer to this structure ans assign the row's address to it. Will make handling easier. You'll need same structure in ram when you set new values and program the flash anew. Use a counter within the struct to see if struct is virgin (0) which needs an initialization and keep track of number of flash writes.
PS: Wo lebst Du? Ich bin nahe Bremen.
Thank you guys for your help so far!
Unfortunately the CySysFlashWriteRow() function does not write to my desired Flash location ( I used
#define MY_FLASH_ROW (CY_FLASH_NUMBER_ROWS - 2) )
and the CYCODE or const declarator is not working for me because I need to be able to change the value (not very often so I am not destroying the flash)
What can I do to access the falsh memory safely?
Ps: Bin gebürtiger Oldenburger, wohne aber in Karlsruhe *schwitz*
The Sflash sounds good but I just don't understand the pseudocode!
I can't use these macros and its not working writing data directly to 0x0FFFF200.
Can you give me an example on how to write a byte/row to the sflash?
On the link for the supervisory flash page there is a project
you can look at.....
Thank you soooo much :)
Its working now exactly how I wanted it to.
Glad I could help.