Hi Team,
we are using the Nrf52840 board for our development. We are facing one issue with RAM Structure Corruption.
We have one Global structure in our code, in that one of the variable is corrupting which is linking with other RAM Variable , it is not part of structure.
Eg:
typedef struct
{
uint8_t BLE_MAC_ID[6];
uint8_t sbSysFlags[4]; // 32 bit variable system wide flags
uint16_t FLA_Reserve9;
uint16_t Sb_Err_Value;
uint16_t Reserve;
uint16_t kpda_kpin_crc[2];
uint16_t ksys_kbox_kold_crc[3];
uint16_t FLA_Reserve10;
}FLA_FS_sysStruct_t;
FLA_FS_sysStruct_t m_Sb_Secure_data ={0};
bool Crc_check_flag = 0;
when ever the "Crc_check_flag" got updated in runtime "m_Sb_Secure_data.Sb_Err_Value" also updating automatically. but there is link between these two variables, both are indepnedent each other, but both are declared and updated in same .c file, but no linkage between these two. How to detect what is the root cause for this detection.Is there any way to identify the stack and RAM overflows.
1. Suppose if want to put the one specific structure in Specific RAM location and no other parts of the code should not disturb this location or data.
2. Similar way for flash as well, if we block one flash sector(0x5e000) for application usage, how to avoid this one by other code parts to overwrite.
It is very urgent for me, if any one having some solution it is very helpful to us.
Regards,
Srinivas.V
