I am using a BL2100 controller w/ (RCM2200) core. I am writing a block of data via WriteUserBlock. The data is:
sizeof(configtype) unsigned int 2920 (0x0B68) bytes
I am writing starting at address 0x0000;
Occasionally, on a power cycle; the values from ReadUserBlock are corrupted. This causes a system re-init, which is somewhat shocking to the customer.
As the user makes changes to the options, WriteUserBlock is used to update the configurations. This is running in a task in uC/OS-II. Is WriteUserBlock task safe or is it getting interrupted and corrupting the write process?
Results from userblock_info.c
Does not contain mirrored ID/User blocks. A power cycle
while the User block is being written can leave the User
block in an inconsistent state.
Combined ID and User blocks consume 0x00004000 (16384) bytes
at the top of the first flash.
Combined ID plus User blocks size: 0x00002000 (8192) bytes.
System ID block / area size: 0x00000084 (132) bytes.
User block size: 0x00001F7C (8060) bytes.
Available User block size: 0x00001C00 (7168) bytes.
Reserved User block size: 0x0000037C (892) bytes.