I’m coding an app on FastTrack XTend + CGPS module which sample gps position every 5 seconds and stores it in an array of 20 positions objects. Every 20 objects i store my struct array into A&D storage in a block.
The storing procedure is:
- erase block
- write new block
- finalize it
I do a recompact procedure every new block writing because i have total 500 block of 20 positions, every position struct is 52 byte size, so 52 * 20 * 500 / 1024 = 508 KB, i need to do recompact to erase completely the old block before reallocating new in a circular queue of 500 blocks.
So, i don’t know if this is the correct procedure to work with A&D storage, because when the app is running since 8-10 hours the cpu hangs (not resets) and the gsm led (red) starts blinking with CGPS led (yellow) at the same time.
I need to reflash firmware + eeprom and erase openat app, flash objects and a&d with DWLWin every time this situation occurs to get back it working again.
What’s wrong ? There’s another way to delete blocks without doing recompact every time ?