STM32WB5MMG, is there a ZigBee Touchlink Example?
Hi all,
I try to implement a ZigBee device that acts as a Touchlink Target.
My hardware is a STM32WB5MMG module. My debug UART is the LPUART1, no other UART configured.
I use the STM32CubeMX 6.6.1 to generate the project and STM32CubeIDE 1.10.1 to compile. My STM32Cube firmware is STM32Cube_FW_WB_V1.14.1.
I ran into severe issues which I cannot solve due to a massive lack of documentation on this topic.
The project generated by the STM32CubeIDE does not compile and gives no debug trace output. This I was able to solve with the following fixes:
- Enable Interrupts for IPCC
- Enable DMA for LPUART1 RX and TX
- Add a call to Init_Debug() in "app_entry.c" in between the "USER CODE BEGEIN/END APP_Init_1" comments
- Delete the line "APP_DBG("Channel used: %d", CHANNEL);" in "app_zigbee.c"
Now I can see at least some trace output on my serial terminal when the application starts up:
[M4 APPLICATION] APP_ZIGBEE_Init
[M4 APPLICATION] **********************************************************
[M4 APPLICATION] WIRELESS COPROCESSOR FW:
[M4 APPLICATION] VERSION ID = 1.13.2
[M4 APPLICATION] FW Type : FFD Zigbee stack
[M4 APPLICATION] Application flashed: ..
[M4 APPLICATION] Link Key: ZigBeeAlliance09
[M4 APPLICATION] Link Key value: 5a 69 67 42 65 65 41 6c 6c 69 61 6e 63 65 30 39
[M4 APPLICATION] Clusters allocated are:
[M4 APPLICATION] OnOff Client on Endpoint 1
[M4 APPLICATION] **********************************************************
[M0] [00000000.000][API] Init_ZigbeeStack_Infrastructure
[M4 APPLICATION] APP_ZIGBEE_StackLayersInit
[M4 APPLICATION] Network config : APP_STARTUP_TOUCHLINK
[M0] [00000000.018][PLATFORM] ZbApsmeAddEndpoint : Adding endpoint 200 (0xc8), profile = 0xc05e, mem = 112At this point then the application hangs, no more outputs. Looks like it waits forever for the ZigBee stack to initialize.
There are two things that come to my mind:
- Does this line "[M4 APPLICATION] Application flashed: .." signal an anomally, because of the ".."? Did I flash the ZigBee stack wrong?
- The trace line "OnOff CLient on Endpoint 1" is created by STMCubeMX indepenend of the Endpoint configuration. Maybe there are some more lines I have to change in the generated code? I already had to change some code to come to this point, so for me the idea that I have to change more is possible.
That leaves me with my problem:
How can I solve this? Since there are no examples from ST that show a working touchlink application I have no Idea how all this output should look like and what behaviour I should actually expect from the ST ZigBee stack.
Has anyone successfully implemented a Touchlink application already? Are there any examples available and I was just too stupid to find them?
Any help or hints are greatly appreciated.
Best Regards
Thomas
