Hi,
I am developing an ESB application with 1 central (nrf52832 DK) and several peripheral. The peripheral are nrf52832 + ICM 20948. Development is done with Segger embedded studio (SES) .
I am using SDK16, the latest.
Application on the peripheral is working correctly in debug mode, although power consumption is higher that would like while CPU resting.
I have tried to compile the program in Release mode but I have ran in issues.
I have tried to understand the difference between Debug and Release mode
I have found that the preprocessor definition have some difference.
for Debug mode : "DEBUG; DEBUG_NRF" from solution in Debug configuration ; For Release mode : "NDEBUG"
DEBUG or NDEBUG does not affect the program operation.
In Code generation section: Optimisation level is set differently.
I ahve found out that Optimisation level 0 work fine. This is the setting for DEBUG mode.
With Optimisation level 1 or 2, the CPU does not communicate correctly with the ICM.
When I try to read the quaternions, I get some blank instead of numbers. Power consumption is not improved.
Optimisation level 1 and specially 2 are supposed to make the program more efficient and consume less power.
Any Idea why it does not work with the ICM?
Regards,
Sylvain