Tool/software: Code Composer Studio
Hello,
I'm developing a code that stores some data for configuration purpose into flash. I'm using the Flash F021 API. I'm able to store all the parameters I need and I can read most of them after CPU reset. The problem appears at some flash addresses where I'm able to see the correct value from the memory browser tab of the CCS but when the value is copied into a local variable, a bit is set to 1 (something that is not possible without erasing the whole flash sector):
uint16_t u16TempBuf;
u16TempBuf = *ptInstance->pu16ReadPoint;
Being pu16ReadPoint a pointer to the desired Flash address. For example, If the value in the flash is 0x0010, when it is copied to the variable u16TempBuf I'm reading a 0x0410.
This occurs only at some addresses and it is repetitive, so every time I load the code, the same addresses are being affected (I'm always storing the same data).
I need to do something special to read the content at Flash addresses for a reliable reading?
Thank you!