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

NRF9160 w_lte_lc_init_and_connect throws __usage_fault after at_cmd(at_socket_fd, subscribe...)

Hi,

I have the latest 0.4.0 tag, flashed the latest modem firmware 0.7.0-29.alpha, and debugging the asset_tracker app under nrf9160_pca10090ns.

When I debug the app it throws a __usage_fault sometime after at_cmd(at_socket_fd, subscribe, AT_CMD_SIZE(subscribe)); within  w_lte_lc_init_and_connect 

Any idea what is asyncronously happening behind the scenes that is throwing the __usage_fault?

Thx!

Parents
  • Hi GJSea,

    I would like to know a little bit more about your "setup".

    Is this an unmodified asset_tracker app running on the nrf91?

    Have you at any times changed or provisioned any keys to the modem?

    I want to reproduce this if possible, so any more information would be helpful.

    Best Regards,

    Martin L.

  • Hi Martin,

    I'm tracking the issue down further, it seems even with the most basic app that does nothing per below, that a stack overflow fault is raised, likely on another OS thread. Anyway of knowing where in Zephyr this is coming from as there isn't any call stack context.

    I'm using the regular 9160DK board, v.0.4.0 tag, latest nRF Connect

    void main(void)
    {
    	printk("Application started\n");
    	while (true) {
    		k_sleep(K_MSEC(10));
    		/* Put CPU to idle to save power */
    		k_cpu_idle();
    	}
    }
    

    This is the output from LTE Link:

    SPM: NS image at 0x8000
    SPM: NS MSP at 0x20029468
    SPM: NS reset vector at 0x10039
    SPM: prepare to jump to Non-Secure image.
    ***** Booting Zephyr OS v1.14.99-ncs1 *****
    Application started
    ***** HARD FAULT *****
    Fault escalation (see below)
    ***** USAGE FAULT *****
    Stack overflow (context area not valid)
    ***** Stack Check Fail! *****
    Current thread ID = 0x200209ec
    Faulting instruction address = 0x20026750
    Fatal fault in thread 0x200209ec! Aborting.

    Thanks!

Reply
  • Hi Martin,

    I'm tracking the issue down further, it seems even with the most basic app that does nothing per below, that a stack overflow fault is raised, likely on another OS thread. Anyway of knowing where in Zephyr this is coming from as there isn't any call stack context.

    I'm using the regular 9160DK board, v.0.4.0 tag, latest nRF Connect

    void main(void)
    {
    	printk("Application started\n");
    	while (true) {
    		k_sleep(K_MSEC(10));
    		/* Put CPU to idle to save power */
    		k_cpu_idle();
    	}
    }
    

    This is the output from LTE Link:

    SPM: NS image at 0x8000
    SPM: NS MSP at 0x20029468
    SPM: NS reset vector at 0x10039
    SPM: prepare to jump to Non-Secure image.
    ***** Booting Zephyr OS v1.14.99-ncs1 *****
    Application started
    ***** HARD FAULT *****
    Fault escalation (see below)
    ***** USAGE FAULT *****
    Stack overflow (context area not valid)
    ***** Stack Check Fail! *****
    Current thread ID = 0x200209ec
    Faulting instruction address = 0x20026750
    Fatal fault in thread 0x200209ec! Aborting.

    Thanks!

Children
Related