This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Optimisation level in SES - nrf52832 + ICM20948

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

Parents Reply
  • Yes I do have a scope, but my voltmeter gave me the same value (an average of the voltage).  I am measuring voltage across a 10 ohm resistor (ground connection) on my external board.  I have open tread about that, but found no obvious solution.  The next step will be to strip the program to the basic and had section by section and see were it goes wrong.  I will get there...

Children
Related