Hi Dialog
We are working on custom board based on DA14681, running SDK 1.0.14.
Problem is that in my code that is based on PxpReporter, i m doing some specific BLE task at high speed. I perform a high speed data transfer over the BLE. Right after that a global variable in my code, gets a garbage value.
After some research, i found out that using global variables in C++, is not a good practice, as it can be accessed and overwrite from anywhere. Then i converted that global variable from uint8_t to INITIALISED_PRIVILEGED_DATA uint8_t and then it worked fine.
So i have two questions:
1 - Does INITIALISED_PRIVILEGED_DATA has some kind of protected memory? If yes then should i convert all my global varibles to INITIALISED_PRIVILEGED_DATA?
2 - Is using global variables a good practice or a bad practice? From dialog DA14681's programming point of view?