I have some variables, logs, configuration data that I want to keep after reset/power failure (around 4K Bytes of data)...
How to do it on LPC1768 without EEPROM? I was thinking of using FLASH. But only first 16 sectors are 4K long, and the program would probably use more than 64KB of FLASH... So, the first issue is to reserve lets say 2 sectors in first 16 sectors of FLASH... How to say to the compiler/linker to avoid using them? Or how to pre-load this sectors with some user data on compile stage?
The second issue is modifying this 4KB sector... So this data is byte related, and it would change regularly (not all of 4KB, but some bytes)... How to keep the written data in FLASH up-to-date? I was thinking using 2 4KB sectors, and alternately use one and the other sector with time stamp (to know witch one is newer so I could erase older one with new data)...
The third issue is writing on flash. While writing, reading flash is impossible. How to manage interrupt routines, or how to transfer those routines to RAM?
I have some variables, logs, configuration data that I want to keep after reset/power failure (around 4K Bytes of data)...
How to do it on LPC1768 without EEPROM? I was thinking of using FLASH. But only first 16 sectors are 4K long, and the program would probably use more than 64KB of FLASH... So, the first issue is to reserve lets say 2 sectors in first 16 sectors of FLASH... How to say to the compiler/linker to avoid using them? Or how to pre-load this sectors with some user data on compile stage?
The second issue is modifying this 4KB sector... So this data is byte related, and it would change regularly (not all of 4KB, but some bytes)... How to keep the written data in FLASH up-to-date? I was thinking using 2 4KB sectors, and alternately use one and the other sector with time stamp (to know witch one is newer so I could erase older one with new data)...
The third issue is writing on flash. While writing, reading flash is impossible. How to manage interrupt routines, or how to transfer those routines to RAM?