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

CONFIG_LOG at runtime

Hi,

Is it possible to disable logger at runtime on nRF9160? I would like to have a logger at device's first startup after flashing (like in production test mode) and then disable the logger when exiting from that test mode and then rebooting and going to the normal device mode. How should I do that or is it even possible?

Could I set CONFIG_LOG to false or am I even able to change configs at runtime?

Regards,
Tero

Parents Reply
  • Could I do that disabling this way?

    1. Flash the device
    2. Running in the test mode
    3. Disable logger
    4. Go to normal mode and reboot the device
    5. Logger not available after reboot

    Is this possible that the device would disable logger (or serial) for rest for its life or to that point someone flashes the device again?

    I have disabled UART0 in the way shown below. But that is done after Non-Volatile storage initialization and when the device mode is read from NVS.

    // Disable UART0
    
    NRF_UARTE0_NS->TASKS_STOPTX = 1;
    NRF_UARTE0_NS->TASKS_STOPRX = 1;
    NRF_UARTE0_NS->ENABLE = 0;

    And replying to my previous message, I haven't tested the suggestion from yet.

Children
Related