I am writing to report a critical issue regarding memory allocation and CRC check failure in the FEE RML48l952 device.
Background :
Normal before change : .In the FEE area we have defined two virtual sectors comprising of one flash sector each (so 0x4000 bytes) , and two Data blocks for two specific sets of data we need to store(copy of which is also going to be in the RAM). The data block sizes are defined based on the actual length of data that we need to store.
2.The software then periodically runs a CRC comparison between the dataset in the RAM and the data stored in the FEE datablocks for both sets of data. If the CRC check fails then the dataset in the RAM is copied to the FEE to resolve the mismatch.
After change : This logic has been working so far but recently we have had to increase the size of one of the datasets (from length 0x2B58 bytes to 0x34C0) and now the CRC mismatches keep occurring even when there is no change to the datasets in RAM.
The crc check is done first for dataset 1(between designated RAM area and Datablock 1 in FEE) and if found to be wrong then the dataset in RAM gets copied to the FEE datablock 1. Then the check is repeated for the second set of data (between designated RAM area and Datablock 2 in FEE) ) and the data gets copied to FEE Datablock 2 if there is mismatch. The issue we observe after the increase in size for second dataset is that during the next periodic check the CRC check for dataset 1 fails again resulting in another FEE write , and subsequent check for Dataset 2 also fails resulting in an FEE write, and this keeps on repeating.
Observation:
The observations from our investigation seems to indicate that write/read to one Datablock is somehow affecting the other Datablock as well. We have also confirmed that the total size of both datasets is still with in the size of the virtual sector. We think that there might be a size incompatibility issue somewhere in the code, which we may have missed. We have reviewed our code and configurations to ensure that we are adhering to the memory and buffer size limitations and nothing has come up in our review so far.
We would really like some guidance on how to proceed further