Skip to main content
PGogt
Associate II
July 14, 2021
Question

How to configure Zigbee and FreeRTOS using CubeMX.

  • July 14, 2021
  • 3 replies
  • 2583 views

How to configure Zigbee and FreeRTOS using CubeMX. Currently the samples under WB55 have two Zigbee and FreeRTOS samples, but for EWARM. Is there a note on how to manually add FreeRTOS to a CubeMX/CubeIDE project for ZigBee. I have an application on STM32F4 which uses an external ZigBee radio. The project uses FreeRTOS for running multiple tasks. Ideal to shift to WB55.

This topic has been closed for replies.

3 replies

pdelrot
Associate
August 11, 2021

Hello. I'm currently stuck on the same item (since January in fact).

I'll be happy to share experiences to find a solution.

In January, no example was available. I tried to port the example into FreeRtos, with the help of similar examples in BLE + FreeRtos.

No luck, the application was running, but the CPU2 never started (stuck at shci_cmd_resp_wait or similar). I did a deep dive inside the example and stack for that, but as closed source for few parts, there are things I couldn't guess.

In June 2 examples with "Zigbee + FreeRtos" appeared, but not compatible with STM32CubeIDE. I tried to adapt them, up to compile, and debug.

This was not working. I request some help from my FAE and learnt that STM32CubeIDE could be expected in July.

Then, July comes.

1) The FreeRtos examples are hardly imported in a fresh STM32CubeIDE installation.

With WB 1.12.1 or WB 1.11.1, the example is stuck at shci_cmd_resp_wait, called in SHCI_C2_ZIGBEE_Init.

I hope this is due to something as a priority problem or similarI'll be able to find in comparison with BLE+FreeRtos.

2) Back to the "standard" examples, they import the wireless binairies 1.11.1 (June 2021), not the last version (1.12.1).

If you program the WB 1.11.1, the example starts and searchs for a network.

If you program the WB 1.12.1, the example hangs at  ZbZclAddEndpoint(zigbee_app_info.zb, &req, &conf); (result is ZB_WPAN_STATUS_SUPERFRAME_OVERLAP)

I'm not sure if it is recommended to use the WB 1.12.1 or not.

I didn't freshly updated support documents about FreeRtos and Zigbee. The most recent documents are about BLE + Zigbee, and SmartEnergy application. All AN and starting guides are 1 year old.

I'm guessing if the examples were tested sucessfully by someone.

I'm searching an open source stack, just in case.

I'll post something if I have good news.

Best regards,

Pascal

pdelrot
Associate
August 11, 2021

I have one first hope :

  • if you import an existing project in the IDE from the STM repository, it compiles and run whitout waiting for ever the CPU2, with the WB 1.12.1.
  • if you import *and* copy the same projet, into another directory, it will not compile without a lot of reconfiguration effort

It's a start... i'll see tomorrow. If its joining my network, I will spend the necessary time to move the project and librairies and what ever it needs.

Pascal

pdelrot
Associate
August 12, 2021

Hi. So, the example is working, but only if added/opened in the IDE from the repository, AND if the Zigbee stack WB 1.12.1 is programmed. It initializes, then join my local Zigbee network (a RPi4).

If programmed with 1.11.1, ZbInit reached, then it waits forever, as stated in the processes status.

Next step, transfer correctly the whole project in a working copy.

Pascal

detakm
Associate
March 9, 2022

Hi Pascal,

I am currently stuck on the same problem. My application uses BLE and Zigbee in static concurrent mode with FreeRTOS. The BLE application runs fine. But when I switch to Zigbee, the SHCI_C2_ZIGBEE_Init does not return. Can you please explain how you got this to work? Thank you!

PGogt
PGogtAuthor
Associate II
August 17, 2021

Unfortunately being short on time, i had to call off this quest. Using a third party zigbee module. I do wish there was more support for this. would have cut my costs a bit.