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

Unknown function at <address> starts executing during the ISR's execution</address>

So...I have an idle task running then a UART interrupt fires upon a character being sent over the serial, and somewhere during the execution of the ISR, it attempts to execute an "unknown" function as shown in the call stack here

And here's the corresponding ASM code which I have no idea about cause I can't trace it.

Pressing the execute debugger button still executes the same function 0x774. Is it in sleep mode?

  • MSP, as mentioned earlier, at the start of the application is 0x20040000, which according to your description, means I'm using a SoftDevice?

    No.

    Mind elaborating on what your initial request was then? Doesn't MSP tell you the start address?

    The SoftDevice inspects the SVC number, and if it is equal or greater than 0x10, the interrupt is processed by the SoftDevice.

    Is 0x774 the SVC number?

    > The SoftDevice uses the first eight bytes of RAM when not enabled. Once enabled, the RAM usage of the SoftDevice increases. With the exception of the call stack, the RAM usage for the SoftDevice is always isolated from the application usage. Therefore, the application is required to not access the RAM region below APP_RAM_BASE. The value of APP_RAM_BASE is obtained by calling sd_softdevice_enable

    where's sd_softdevice_enable located? i can't seem to find it in my application

  • Hi,

    morpho said:
    Mind elaborating on what your initial request was then? Doesn't MSP tell you the start address?

    I was referring to the start address of the application in flash as a simple way to know if you use a SoftDevice. If you application starts at 0x0, you do not. If it starts at 0x1000 you are probably using the MBR only. If it start at something higher than that you are probably using a SoftDevice (which includes the MBR).

    morpho said:
    Is 0x774 the SVC number?

    No, it is within the interrupt forwarding table. It seems to be for UART0/UARTE0 (UART0_UARTE0_IRQHandler), which is enabled by default in the example project for UART logging.

    morpho said:
    where's sd_softdevice_enable located? i can't seem to find it in my application

    If you are still using ble_app_hrs_freertos() and have not removed large parts of the code, then you call sd_softdevice_enable() indirectly from ble_stack_init() by calling nrf_sdh_enable_request() (see implementation in <SDK>\components\softdevice\common\nrf_sdh.c).

Related