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

Unable to add FreeRTOS to Thread Secure DFU example

I ported the Thread Secure DFU example to use FreeRTOS, however I get a hard fault if something is scheduled using the app_timer provided.

Calling coap_dfu_trigger or handling a bsp button press results in

Can the app_timer/app_scheduler from nRF SDK be used together with FreeRTOS? 

Setup:

Segger Embedded Studio v5.10b
Nordic nRF52840
nRF5 SDK for Thread and Zigbee v4.1.0

Parents
  • Using the document "Analyzing HardFaults on Cortex-M CPUs (AN00016)", I think it's related to priorities for interrupts.

    Stepping out of the hard fault shows:

    With RADIO IRQ prio set to 0:

    Which is higher (lower number) then configMAX_SYSCALL_INTERRUPT_PRIORITY

    I have these in FreeRTOSConfig.h;

    #define configLIBRARY_LOWEST_INTERRUPT_PRIORITY       _PRIO_APP_LOWEST
    #define configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY  _PRIO_APP_HIGH
    #define configKERNEL_INTERRUPT_PRIORITY               configLIBRARY_LOWEST_INTERRUPT_PRIORITY
    #define configMAX_SYSCALL_INTERRUPT_PRIORITY          configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY

Reply
  • Using the document "Analyzing HardFaults on Cortex-M CPUs (AN00016)", I think it's related to priorities for interrupts.

    Stepping out of the hard fault shows:

    With RADIO IRQ prio set to 0:

    Which is higher (lower number) then configMAX_SYSCALL_INTERRUPT_PRIORITY

    I have these in FreeRTOSConfig.h;

    #define configLIBRARY_LOWEST_INTERRUPT_PRIORITY       _PRIO_APP_LOWEST
    #define configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY  _PRIO_APP_HIGH
    #define configKERNEL_INTERRUPT_PRIORITY               configLIBRARY_LOWEST_INTERRUPT_PRIORITY
    #define configMAX_SYSCALL_INTERRUPT_PRIORITY          configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY

Children
Related