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

nrf9160 board unexpectedly reboot itself after cellular connection is established

hi, 

I had the board run the following code to connect it to the cellular tower:

#include <zephyr.h>
#include <stdio.h>
#include <string.h>
#include <lte_lc.h>

void main(void)
{
    int ret = lte_lc_init_and_connect();
    if (ret ==0)
        printk("lte_lc_init_and_connect() succeeded");
    else
        printk("lte_lc_init_and_connect() failed");

    while(1) {};
}

Every time after reset I always saw it prints "lte_lc_init_and_connect() succeeded". Then I expected it to stay connected forever. Some boards meet my expectation. Some other boards don't, they could reboot themselves some time. 

The cellular signal strength is about -80db in my area.

could you please explain why this happens?

Best,

Kai

  • Hello Kai,

    Can you please provide some background information? Is the code based on any example or are your building from scratch?

    Some other boards don't, they could reboot themselves some time. 

     Is the board resetting or do you mean the connection? If its the connection, can you please provide the output from the at_client application? This gives some debugging information we can work with.

    Kind regards,
    Oeyvind

  • Hi Oyvind,

    The code is based on asset_tracker, simply replacing main.c with the above code.

    Is the board resetting or do you mean the connection?

    I meant "the board is resetting".

    If I run the original Nordic asset_tracker code, I could see several resets happen before the connection is established successfully. Please see the attached log.

    ***** Booting Zephyr OS v1.13.99-ncs2 *****
    Secure Boot: configure flash
    Secure Boot: SPU: set region 0 as Secure
    Secure Boot: SPU: set region 1 as Secure
    Secure Boot: SPU: set region 2 as Secure
    Secure Boot: SPU: set region 3 as Secure
    Secure Boot: SPU: set region 4 as Secure
    Secure Boot: SPU: set region 5 as Secure
    Secure Boot: SPU: set region 6 as Secure
    Secure Boot: SPU: set region 7 as Secure
    Secure Boot: SPU: set Flash region 8 as Non-Secure
    Secure Boot: SPU: set Flash region 9 as Non-Secure
    Secure Boot: SPU: set Flash region 10 as Non-Secure
    Secure Boot: SPU: set Flash region 11 as Non-Secure
    Secure Boot: SPU: set Flash region 12 as Non-Secure
    Secure Boot: SPU: set Flash region 13 as Non-Secure
    Secure Boot: SPU: set Flash region 14 as Non-Secure
    Secure Boot: SPU: set Flash region 15 as Non-Secure
    Secure Boot: SPU: set Flash region 16 as Non-Secure
    Secure Boot: SPU: set Flash region 17 as Non-Secure
    Secure Boot: SPU: set Flash region 18 as Non-Secure
    Secure Boot: SPU: set Flash region 19 as Non-Secure
    Secure Boot: SPU: set Flash region 20 as Non-Secure
    Secure Boot: SPU: set Flash region 21 as Non-Secure
    Secure Boot: SPU: set Flash region 22 as Non-Secure
    Secure Boot: SPU: set Flash region 23 as Non-Secure
    Secure Boot: SPU: set Flash region 24 as Non-Secure
    Secure Boot: SPU: set Flash region 25 as Non-Secure
    Secure Boot: SPU: set Flash region 26 as Non-Secure
    Secure Boot: SPU: set Flash region 27 as Non-Secure
    Secure Boot: SPU: set Flash region 28 as Non-Secure
    Secure Boot: SPU: set Flash region 29 as Non-Secure
    Secure Boot: SPU: set Flash region 30 as Non-Secure
    Secure Boot: SPU: set Flash region 31 as Non-Secure
    Secure Boot: configure SRAM
    Secure Boot: SPU: set SRAM region 0 as Secure
    Secure Boot: SPU: set SRAM region 1 as Secure
    Secure Boot: SPU: set SRAM region 2 as Secure
    Secure Boot: SPU: set SRAM region 3 as Secure
    Secure Boot: SPU: set SRAM region 4 as Secure
    Secure Boot: SPU: set SRAM region 5 as Secure
    Secure Boot: SPU: set SRAM region 6 as Secure
    Secure Boot: SPU: set SRAM region 7 as Secure
    Secure Boot: SPU: set SRAM region 8 as Non-Secure
    Secure Boot: SPU: set SRAM region 9 as Non-Secure
    Secure Boot: SPU: set SRAM region 10 as Non-Secure
    Secure Boot: SPU: set SRAM region 11 as Non-Secure
    Secure Boot: SPU: set SRAM region 12 as Non-Secure
    Secure Boot: SPU: set SRAM region 13 as Non-Secure
    Secure Boot: SPU: set SRAM region 14 as Non-Secure
    Secure Boot: SPU: set SRAM region 15 as Non-Secure
    Secure Boot: SPU: set SRAM region 16 as Non-Secure
    Secure Boot: SPU: set SRAM region 17 as Non-Secure
    Secure Boot: SPU: set SRAM region 18 as Non-Secure
    Secure Boot: SPU: set SRAM region 19 as Non-Secure
    Secure Boot: SPU: set SRAM region 20 as Non-Secure
    Secure Boot: SPU: set SRAM region 21 as Non-Secure
    Secure Boot: SPU: set SRAM region 22 as Non-Secure
    Secure Boot: SPU: set SRAM region 23 as Non-Secure
    Secure Boot: SPU: set SRAM region 24 as Non-Secure
    Secure Boot: SPU: set SRAM region 25 as Non-Secure
    Secure Boot: SPU: set SRAM region 26 as Non-Secure
    Secure Boot: SPU: set SRAM region 27 as Non-Secure
    Secure Boot: SPU: set SRAM region 28 as Non-Secure
    Secure Boot: SPU: set SRAM region 29 as Non-Secure
    Secure Boot: SPU: set SRAM region 30 as Non-Secure
    Secure Boot: SPU: set SRAM region 31 as Non-Secure
    Secure Boot: configure peripherals
    Secure Boot: MSP_NS 2002ab70
    Secure Boot: prepare to jump to Non-Secure image
    ***** Booting Zephyr OS v1.13.99-ncs2 *****
    Application started
    LTE LC config ...
    ***** Booting Zephyr OS v1.13.99-ncs2 *****
    Secure Boot: configure flash
    Secure Boot: SPU: set region 0 as Secure
    Secure Boot: SPU: set region 1 as Secure
    Secure Boot: SPU: set region 2 as Secure
    Secure Boot: SPU: set region 3 as Secure
    Secure Boot: SPU: set region 4 as Secure
    Secure Boot: SPU: set region 5 as Secure
    Secure Boot: SPU: set region 6 as Secure
    Secure Boot: SPU: set region 7 as Secure
    Secure Boot: SPU: set Flash region 8 as Non-Secure
    Secure Boot: SPU: set Flash region 9 as Non-Secure
    Secure Boot: SPU: set Flash region 10 as Non-Secure
    Secure Boot: SPU: set Flash region 11 as Non-Secure
    Secure Boot: SPU: set Flash region 12 as Non-Secure
    Secure Boot: SPU: set Flash region 13 as Non-Secure
    Secure Boot: SPU: set Flash region 14 as Non-Secure
    Secure Boot: SPU: set Flash region 15 as Non-Secure
    Secure Boot: SPU: set Flash region 16 as Non-Secure
    Secure Boot: SPU: set Flash region 17 as Non-Secure
    Secure Boot: SPU: set Flash region 18 as Non-Secure
    Secure Boot: SPU: set Flash region 19 as Non-Secure
    Secure Boot: SPU: set Flash region 20 as Non-Secure
    Secure Boot: SPU: set Flash region 21 as Non-Secure
    Secure Boot: SPU: set Flash region 22 as Non-Secure
    Secure Boot: SPU: set Flash region 23 as Non-Secure
    Secure Boot: SPU: set Flash region 24 as Non-Secure
    Secure Boot: SPU: set Flash region 25 as Non-Secure
    Secure Boot: SPU: set Flash region 26 as Non-Secure
    Secure Boot: SPU: set Flash region 27 as Non-Secure
    Secure Boot: SPU: set Flash region 28 as Non-Secure
    Secure Boot: SPU: set Flash region 29 as Non-Secure
    Secure Boot: SPU: set Flash region 30 as Non-Secure
    Secure Boot: SPU: set Flash region 31 as Non-Secure
    Secure Boot: configure SRAM
    Secure Boot: SPU: set SRAM region 0 as Secure
    Secure Boot: SPU: set SRAM region 1 as Secure
    Secure Boot: SPU: set SRAM region 2 as Secure
    Secure Boot: SPU: set SRAM region 3 as Secure
    Secure Boot: SPU: set SRAM region 4 as Secure
    Secure Boot: SPU: set SRAM region 5 as Secure
    Secure Boot: SPU: set SRAM region 6 as Secure
    Secure Boot: SPU: set SRAM region 7 as Secure
    Secure Boot: SPU: set SRAM region 8 as Non-Secure
    Secure Boot: SPU: set SRAM region 9 as Non-Secure
    Secure Boot: SPU: set SRAM region 10 as Non-Secure
    Secure Boot: SPU: set SRAM region 11 as Non-Secure
    Secure Boot: SPU: set SRAM region 12 as Non-Secure
    Secure Boot: SPU: set SRAM region 13 as Non-Secure
    Secure Boot: SPU: set SRAM region 14 as Non-Secure
    Secure Boot: SPU: set SRAM region 15 as Non-Secure
    Secure Boot: SPU: set SRAM region 16 as Non-Secure
    Secure Boot: SPU: set SRAM region 17 as Non-Secure
    Secure Boot: SPU: set SRAM region 18 as Non-Secure
    Secure Boot: SPU: set SRAM region 19 as Non-Secure
    Secure Boot: SPU: set SRAM region 20 as Non-Secure
    Secure Boot: SPU: set SRAM region 21 as Non-Secure
    Secure Boot: SPU: set SRAM region 22 as Non-Secure
    Secure Boot: SPU: set SRAM region 23 as Non-Secure
    Secure Boot: SPU: set SRAM region 24 as Non-Secure
    Secure Boot: SPU: set SRAM region 25 as Non-Secure
    Secure Boot: SPU: set SRAM region 26 as Non-Secure
    Secure Boot: SPU: set SRAM region 27 as Non-Secure
    Secure Boot: SPU: set SRAM region 28 as Non-Secure
    Secure Boot: SPU: set SRAM region 29 as Non-Secure
    Secure Boot: SPU: set SRAM region 30 as Non-Secure
    Secure Boot: SPU: set SRAM region 31 as Non-Secure
    Secure Boot: configure peripherals
    Secure Boot: MSP_NS 2002ab70
    Secure Boot: prepare to jump to Non-Secure image
    ***** Booting Zephyr OS v1.13.99-ncs2 *****
    Application started
    LTE LC config ...
    ***** Booting Zephyr OS v1.13.99-ncs2 *****
    Secure Boot: configure flash
    Secure Boot: SPU: set region 0 as Secure
    Secure Boot: SPU: set region 1 as Secure
    Secure Boot: SPU: set region 2 as Secure
    Secure Boot: SPU: set region 3 as Secure
    Secure Boot: SPU: set region 4 as Secure
    Secure Boot: SPU: set region 5 as Secure
    Secure Boot: SPU: set region 6 as Secure
    Secure Boot: SPU: set region 7 as Secure
    Secure Boot: SPU: set Flash region 8 as Non-Secure
    Secure Boot: SPU: set Flash region 9 as Non-Secure
    Secure Boot: SPU: set Flash region 10 as Non-Secure
    Secure Boot: SPU: set Flash region 11 as Non-Secure
    Secure Boot: SPU: set Flash region 12 as Non-Secure
    Secure Boot: SPU: set Flash region 13 as Non-Secure
    Secure Boot: SPU: set Flash region 14 as Non-Secure
    Secure Boot: SPU: set Flash region 15 as Non-Secure
    Secure Boot: SPU: set Flash region 16 as Non-Secure
    Secure Boot: SPU: set Flash region 17 as Non-Secure
    Secure Boot: SPU: set Flash region 18 as Non-Secure
    Secure Boot: SPU: set Flash region 19 as Non-Secure
    Secure Boot: SPU: set Flash region 20 as Non-Secure
    Secure Boot: SPU: set Flash region 21 as Non-Secure
    Secure Boot: SPU: set Flash region 22 as Non-Secure
    Secure Boot: SPU: set Flash region 23 as Non-Secure
    Secure Boot: SPU: set Flash region 24 as Non-Secure
    Secure Boot: SPU: set Flash region 25 as Non-Secure
    Secure Boot: SPU: set Flash region 26 as Non-Secure
    Secure Boot: SPU: set Flash region 27 as Non-Secure
    Secure Boot: SPU: set Flash region 28 as Non-Secure
    Secure Boot: SPU: set Flash region 29 as Non-Secure
    Secure Boot: SPU: set Flash region 30 as Non-Secure
    Secure Boot: SPU: set Flash region 31 as Non-Secure
    Secure Boot: configure SRAM
    Secure Boot: SPU: set SRAM region 0 as Secure
    Secure Boot: SPU: set SRAM region 1 as Secure
    Secure Boot: SPU: set SRAM region 2 as Secure
    Secure Boot: SPU: set SRAM region 3 as Secure
    Secure Boot: SPU: set SRAM region 4 as Secure
    Secure Boot: SPU: set SRAM region 5 as Secure
    Secure Boot: SPU: set SRAM region 6 as Secure
    Secure Boot: SPU: set SRAM region 7 as Secure
    Secure Boot: SPU: set SRAM region 8 as Non-Secure
    Secure Boot: SPU: set SRAM region 9 as Non-Secure
    Secure Boot: SPU: set SRAM region 10 as Non-Secure
    Secure Boot: SPU: set SRAM region 11 as Non-Secure
    Secure Boot: SPU: set SRAM region 12 as Non-Secure
    Secure Boot: SPU: set SRAM region 13 as Non-Secure
    Secure Boot: SPU: set SRAM region 14 as Non-Secure
    Secure Boot: SPU: set SRAM region 15 as Non-Secure
    Secure Boot: SPU: set SRAM region 16 as Non-Secure
    Secure Boot: SPU: set SRAM region 17 as Non-Secure
    Secure Boot: SPU: set SRAM region 18 as Non-Secure
    Secure Boot: SPU: set SRAM region 19 as Non-Secure
    Secure Boot: SPU: set SRAM region 20 as Non-Secure
    Secure Boot: SPU: set SRAM region 21 as Non-Secure
    Secure Boot: SPU: set SRAM region 22 as Non-Secure
    Secure Boot: SPU: set SRAM region 23 as Non-Secure
    Secure Boot: SPU: set SRAM region 24 as Non-Secure
    Secure Boot: SPU: set SRAM region 25 as Non-Secure
    Secure Boot: SPU: set SRAM region 26 as Non-Secure
    Secure Boot: SPU: set SRAM region 27 as Non-Secure
    Secure Boot: SPU: set SRAM region 28 as Non-Secure
    Secure Boot: SPU: set SRAM region 29 as Non-Secure
    Secure Boot: SPU: set SRAM region 30 as Non-Secure
    Secure Boot: SPU: set SRAM region 31 as Non-Secure
    Secure Boot: configure peripherals
    Secure Boot: MSP_NS 2002ab70
    Secure Boot: prepare to jump to Non-Secure image
    ***** Booting Zephyr OS v1.13.99-ncs2 *****
    Application started
    LTE LC config ...
    NRF_CLOUD_EVT_TRANSPORT_CONNECTED
    NRF_CLOUD_EVT_USER_ASSOCIATED
    NRF_CLOUD_EVT_READY
    NRF_CLOUD_EVT_SENSOR_ATTACHED
    NRF_CLOUD_EVT_SENSOR_ATTACHED
    GPS device found

    Best,

    Kai

  • It's difficult for me to say what's causing the issue. Do you experience the board resetting when running the asset_trackker?

    Since you're having issues with connecting I will need to have AT_client output. This has more debugging information for us to look through. 

    What do you receive from:

    int ret = lte_lc_init_and_connect();

    Please provide some debug information from your code.

    Thanks

    Kind regards,
    Oeyvind

Related