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

How to find error causing code witch is caugt by app_error_weak.c

I have built a custom chip with nrf52840 on it.

I use Ses as development tool.

I took as startingpoint for software SDK15.3 with Softdevice 140

I took the ble_template from the SDK and copied my code init.

I can compile the code without any error, but when I flash it on the device it does not start to advertise.

In debugger mode it starts up well, but then runs into app_error_weak.c

now the function gives error code and stuff, but I don't know, how to find the code witch caused the error

that is what i got from ses and the error handler

I'm not sure if its relevant but in call stack ar two functions in it

the first is in app_error_weak.c

the secound is in app_error_handler_gcc.c

and shows those parameters 

because error_code in one handler and id in the other ar the same i guess, that 1 error is thrown and chaugt by both handlers, or

one handler calls the other.

But I don't know now how to solve this. And how to search for the code whitch caused the error.

thanks for any help

Parents Reply
  • at the moment I'm debugging

    the function sd_advertising_start() returns 8 invalid state

    in this funciton it is a call to 

    ble_advdata_set() returns 7 invalid parameter

    in this function is a call to

    sd_ble_uuid_encode() returns also 7

    after sd_ble_uuid_encode() returns error code the function hangs up in a infinity loop

    were it always enters sd_advertiseing_start() and always returns 8 

    but never ever passes the breakpoint by ble_advdata_set() or 

    sd_ble_uuid_encode()

    but in the infocenter i can not find clear informations about this function,

    All information I found about this is ...

    I don't have a clue what this minimalistic information should give me... 

Children
Related