cancel
Showing results for 
Search instead for 
Did you mean: 

STM32WB55CG Zigbee connection with Custom Project

vh789
Associate III

Hi,

I am still trying to intetrage my custom board with an STM32WB55CG into my Tuya/Smartlife System with the target of transmitting sensordata and receiving commands (e.g. LED color).

In this https://community.st.com/t5/stm32-mcus-wireless/stm32wb55cg-zigbee-connection-tuya-smartlife-with-st-example/m-p/720530#M21149 question, I was told to use P-NUCLEO-WB55.Nucleo\Applications\Zigbee\Zigbee_OnOff_Client_Distrib Example with which I could successfully connect the controller to my network. 

Since I have a custom board (other chip than Nucleo), I needed to create a new CubeMX project in which I copied all interfaces from the example and applied my pinout.

In CubeMX I found the option to configure my Chip to a Zigbee purpose already, so I chose the following settings:

SettingMy ProjectExample
Zigbee ApplicationFull Function DeviceFull Function Device
Zigbee Network ModeCentralizedDistributed
Zigbee Device RoleRouterN/A
HWUARTDisabledEnabled
Device IDOnOff SwitchOnOff Switch

Unfortunately I could not get the same result with my custom project. Furthermore, now I have access to UART and tried to output the debug messages, and therefore found out that the init function from "app_zigbee.c" is never even called.

Since some of the settings are different, I tried copying the complete content from Example "app_zigbee.c" and "app_entry.c" to my project, the result is still the same.

I expected, that now everything should be the same an I will be able to connect the device again. For the case that I missed something in the configuration, I attached my CubeMX file. I can also share the project if needed.

Thanks for your help

1 ACCEPTED SOLUTION

Accepted Solutions
Ouadi
ST Employee

Hello,

It seems that the IPCC interrupts are note activated on your IOC file making the communication impossible between M0/M4, the app_zigbee_init will not be called in this case. 

Please activate the IPCC Tx and Rx interrupts as follow and give it a try :

Ouadi_0-1727428853031.png

Best regards,

Ouadi

View solution in original post

3 REPLIES 3
Ouadi
ST Employee

Hello,

It seems that the IPCC interrupts are note activated on your IOC file making the communication impossible between M0/M4, the app_zigbee_init will not be called in this case. 

Please activate the IPCC Tx and Rx interrupts as follow and give it a try :

Ouadi_0-1727428853031.png

Best regards,

Ouadi

vh789
Associate III

Hi Ouadi,

thank you very much, I manged to get it running thanks to your help. For other use cases (temperature sensor, LED control), I came across the same problem with Tuya/Smartlife as here https://community.st.com/t5/stm32-mcus-wireless/stm32wb5mm-dk-connecting-to-tuya-gateway-with-zigbee-part-2/m-p/630003 . My plan is now, to create a Zigbee2mqtt and Homeassistent Network and hope, that the problem is not valid there.

Additionally, my MCU can not automatically reconnect to the network after restart. I have seen from here https://community.st.com/t5/stm32-mcus-wireless/rejoining-zigbee-network-fails/td-p/640696 that there are NVM examples available. I have two questions regarding that:

  • Is there an NVM integrated in the Chip or do i need to connect an external NVM?
  • (How) can I configure the NVM integration from CubeMX?

Thanks

Ouadi
ST Employee

Hi @vh789,

Good to hear that your issue is now solved. 

Please find below my answers :

  • There is no physical EEPROM integrated to the STM32WB MCU, we use the internal flash memory to emulate the EEPROM on the project examples.
  • For now, there is no possibility to enable the NVM using CubeMX, you can refer to this application note AN5492 that describes the implementation of the persistent data management ZigBee and the non-volatile memory in the STM32WB Series in addition to the NVM project examples.

For any other question, please raise a new post.

Regards,

Ouadi