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

Add zigbee to an existing freeRTOS project with BLE.

Hello

I'm trying to add zigbee to an existing freeRTOS project with BLE.
The approach so far is combining "Zigbee Multi Sensor with FreeRTOS Example" and "Adding dynamic multiprotocol Zigbee support to BLE examples"
During the "zboss_start_no_autostart()", the program asserts at "configASSERT( xTaskToNotify );"

    void vTaskGenericNotifyGiveFromISR( TaskHandle_t xTaskToNotify,
                                        UBaseType_t uxIndexToNotify,
                                        BaseType_t * pxHigherPriorityTaskWoken )
    {
        TCB_t * pxTCB;
        uint8_t ucOriginalNotifyState;
        UBaseType_t uxSavedInterruptStatus;

        configASSERT( xTaskToNotify );
        configASSERT( uxIndexToNotify < configTASK_NOTIFICATION_ARRAY_ENTRIES );

Any clues or ideas of how to get pass this?

Dev setup:
Win 10
gcc-arm-none-eabi-9-2020-q2
FreeRTOS 10.4.0
nRF5 SDK for thread and Zigbee 4.1.0
nRF52840-DK

libs:
nrf_radio_driver_softdevice.a
libzboss.a (debug version)
s140_nrf52_6.1.1_softdevice.hex

Defines
SOFTDEVICE_PRESENT
S140
RAAL_SOFTDEVICE=1
FREERTOS
ZB_TRACE_LEVEL=0
ZB_TRACE_MASK=0

Parents
  • Hi,

    I do not see any references to vTaskGenericNotifyGiveFromISR in the Thread SDK nor in FreeRTOS API.

    Where is it defined? what is the context it is called from? 

    I need the context and some code snippets to understand more about the issue.

  • It's called somewhere inside zboss_start_no_autostart() which is a part of the zboss stack

    void zigbee_main_task(void *pvParameter)
    {
        zb_ret_t       zb_err_code;
    
        UNUSED_PARAMETER(pvParameter);
    
        NRF_LOG_INFO("The zigbee_main_task started.");
    
        /* Start Zigbee Stack. */
        zb_err_code = zboss_start_no_autostart();
        ZB_ERROR_CHECK(zb_err_code);
    
        while (true)
        {
            if (xSemaphoreTakeRecursive(m_zigbee_main_task_mutex, 5) == pdTRUE)
            {
                zboss_main_loop_iteration();
                UNUSED_RETURN_VALUE(xSemaphoreGiveRecursive(m_zigbee_main_task_mutex));
            }
            vTaskDelay(1);
        }
    }

Reply
  • It's called somewhere inside zboss_start_no_autostart() which is a part of the zboss stack

    void zigbee_main_task(void *pvParameter)
    {
        zb_ret_t       zb_err_code;
    
        UNUSED_PARAMETER(pvParameter);
    
        NRF_LOG_INFO("The zigbee_main_task started.");
    
        /* Start Zigbee Stack. */
        zb_err_code = zboss_start_no_autostart();
        ZB_ERROR_CHECK(zb_err_code);
    
        while (true)
        {
            if (xSemaphoreTakeRecursive(m_zigbee_main_task_mutex, 5) == pdTRUE)
            {
                zboss_main_loop_iteration();
                UNUSED_RETURN_VALUE(xSemaphoreGiveRecursive(m_zigbee_main_task_mutex));
            }
            vTaskDelay(1);
        }
    }

Children
Related