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

nRF52 FreeRTOS using the S132 SoftDevice

Is there are working example of FreeRTOS running on the nRF52 using the S132 SoftDevice? I am trying to get a ble_hrs example running with a updated version of the FreeRTOS portable layer I was provided by my Nordic Sales contact but it's not working.

I am using nRF52 SDK 0.9.2 and SoftDevice s132 1.0.0-3 alpha on PCA10040. The ble_hrs FreeRTOS example I used is from the nRF51 SDK version 10.0.0 and I think I am missing something since it runs fine when complied for the nRF51.

Thank you in advance, Darren

Parents Reply
  • For example,

    in the app_timer.h:

    ...
    #if defined(FREERTOS)
    typedef struct app_timer_t { uint32_t data[CEIL_DIV(APP_TIMER_NODE_SIZE, sizeof(uint32_t))]; } app_timer_t;
    typedef app_timer_t * app_timer_id_t;
    #define APP_TIMER_DEF(timer_id)                                  \
        static app_timer_t timer_id##_data = { {0} };                  \
        static const app_timer_id_t timer_id = &timer_id##_data
    #else
    typedef uint32_t app_timer_id_t;
    #endif
    ...
    

    in the bsp.c:

    ...
    #if defined(FREERTOS)
    APP_TIMER_DEF(m_leds_timer_id);
    APP_TIMER_DEF(m_alert_timer_id);
    #else
    static app_timer_id_t   m_leds_timer_id;
    static app_timer_id_t   m_alert_timer_id;
    #endif
    ...
    
Children
No Data
Related