Problem running code in release mode when NRF_LOG_BACKEND_UART_ENABLED and NRF_LOG are disabled

Hello,

I am having an issue with running my application in release mode. It will only run when NRF_LOG_ENABLED = 1 and NRF_LOG_BACKEND_UART_ENABLED = 1. I can run my debug configuration with both of these disabled. I would like to disable them as it reduces power consumption of my device. I can run the debugger in the release config and the device will advertise and i can connect to it but it doesn't work when i flash the hex file.

I've tried setting optimization level to 'none' for release build and I've tried disabling and enabling the logs and uart.

Any help with this is appreciated.

Thanks

Parents Reply
  • Hi Jonathan, 
    I couldn't see anything suspicious in the regs. 
    But you can check what the PC:0x002B9D2 point to with the addr2line.exe tool, it should be able to point you to where the program counter stuck at. I would suggest to try nrfjprog --readregs some more times to see the PC is still in the same area. 

    Which SDK and softdevice version are you using ? 

    Could you try not to put the CPU to sleep in the main loop to see if you still have the same problem ? 

    Have you looked at anything else that can cause your application different from the blinky ?

    You can try to disable the functionality one by one until your application getting similar to the blinky. For example the code that you interface with the external peripheral. 


Children
Related