Hi all,
I’m developing a project with CC1110 + IAR + Simpliciti and I need help with an issue concerning to flash writing.
I need to store 728 bytes into the flash. I have done a function where I can do it without problem. I use the example given in the “cc1110_cc2510_Basic Software_Examples”.
In my code example I use the flash page 31 (it start in the address 0x7C00). If I write all bytes consecutively (728), so I haven’t problem. I know that before to write the page is erased (1024 bytes) and the my 728 bytes are written.
Please let me introduce the problem:
Basically my app consist in receiving 7 frames with 104 bytes each. These frames are buffered into a buffer of size 728 bytes in order to realize a single write in the page. I assume that the size page is 1024 bytes. Then I write the buffer to flash. The problem is that some time the write is not performed because the RAM is overflowed and a watchdog reset is done. This is because I use almost 3100 bytes of RAM. In addition my app has been became greater and I need more RAM.
For this reason, I’m looking for an alternative. Described below.
I have created 7 flash subpages, with a size of 128 bytes. Each flash subpages will contain the each frame of 104 bytes. First subpage start in the address 0x7C00, the second in the 0x7C68, etc. When I receive first frame, I write to the first subpage page and the result is ok. When I receive the second, I write to the second subpage ok, BUT first flash subpage is erased. I suppose that is because before to write is needed erase the complete page (1024 bytes, from 0x7C00 to 0x8000). The problem is that I need to maintain all the subpages.
My question is, it exists any way to write and retain subpages in the flash memory?
I’m trying to reduce my RAM variables, use them as a locals, etc.
Is the “Allocate mem” function implemented in Simpliciti / CC1110??
Thank you very much.
Joaquim.