Part Number: CC2640R2F
Other Parts Discussed in Thread: SIMPLICITI
Tool/software: TI-RTOS
Hi there,
I would like to understand better how the flash memory is organized in CC2640R2F.
I'm working with modified versions of SimpleBLEPeripheral and emptyProject.
Basically, I have a sensor from which I need to sample 10s of data at 1 kSa/s. Using the onboard 12 bits ADC, that would be roughly 15 kB. On those, I plan to do some processing before sending results over BLE.
Given 20 kB of SRAM, I am unable to keep all these samples in SRAM for processing and thus I would like to save them in flash.
I am aware of NVS functions to read / write flash memory and I have a few doubts:
- I read only 2 pages of 4 kB are available. If I have more free flash memory, why can't I use it?
- Following this thread
I was able to allocate an array into flash. When I try to write into it using basic C syntax ( array[index] = foo; ), the program hangs. How can I write into it then? - I've also tried to change the linker .cmd file and place the .bss section into flash. I succeded in allocating my global big array into flash but I noticed that when debugging the program starts immediately after loading finishes (normally the program stops at the beginning of main after loading) but I cannot understand where it hangs (similar to point 2).
What would you recommend? Notice I don't really need persistent storage, data can be erased after processing and transmisison over BLE.
Best regards,
Jack