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

Thingy91 stuck in boot loop

Hi,

I'm trying to use Zephyr's 'http_client' library in Asset Tracker V2. I have included 'net/http_client.h' in main.c and have set 'CONFIG_HTTP_CLIENT=y' in prj.conf. If I make a call to any function that would make linker to actually link HTTP_CLIENT, thingy gets stuck in a boot loop. Red LED keeps blinking, and the only message on serial port  is:

*** Booting Zephyr OS build v2.6.0-rc1-ncs1  ***


which repeats itself every 5 seconds or so.

I am sure I am not calling any functions in that library, as I have the call to http_client after a call to LOG_WRN(). It almost feels like HTTP_CLIENT is somehow incompatible with Thingy 91. Has anyone faced this issue?

I am using SDK v1.6.1.

  • Did a little bit of digging. Turns out I hadn't buried my code deep enough and it was being executed via the event handler, leading to a Stack Overflow. Totally unrelated to the linked library.

    [00:00:10.245,574] <inf> event_manager: APP_EVT_START

    [00:00:10.251,098] <err> os: ***** USAGE FAULT *****
    [00:00:10.256,683] <err> os:   Stack overflow (context area not valid)
    [00:00:10.263,916] <err> os: r0/a1:  0x2001b310  r1/a2:  0xe000ed00  r2/a3:  0x00052030
    [00:00:10.272,583] <err> os: r3/a4:  0x0001bcd5 r12/ip:  0x0000a000 r14/lr:  0x0002548d
    [00:00:10.281,250] <err> os:  xpsr:  0x21000000
    [00:00:10.286,468] <err> os: s[ 0]:  0x00000000  s[ 1]:  0x00000000  s[ 2]:  0x00000000  s[ 3]:  0x00000000
    [00:00:10.296,905] <err> os: s[ 4]:  0x00000000  s[ 5]:  0x00000000  s[ 6]:  0x00000000  s[ 7]:  0x00000000
    [00:00:10.307,312] <err> os: s[ 8]:  0xffffffff  s[ 9]:  0xffffffff  s[10]:  0xffffffff  s[11]:  0xffffffff
    [00:00:10.317,749] <err> os: s[12]:  0x00000000  s[13]:  0xffffffff  s[14]:  0xffffffff  s[15]:  0x00000000
    [00:00:10.328,155] <err> os: fpscr:  0x01286002
    [00:00:10.333,374] <err> os: Faulting instruction address (r15/pc): 0x0001bcd8
    [00:00:10.341,278] <err> os: >>> ZEPHYR FATAL ERROR 2: Stack overflow on CPU 0
    [00:00:10.349,182] <err> os: Current thread: 0x20019278 (unknown)

    Increased events stack size and problem was resolved.

Related