cancel
Showing results for 
Search instead for 
Did you mean: 

Zigbee application stuck at M0 callback

_Garacio_
Associate

Hi!
I am trying to reproduce some examples and got stuck at simple sensor.

The example code is working fine on my P-Nucleo-wb55, but if I am trying to reproduce i with CubeMX i've got failed

Code is simply stuck at 

void shci_cmd_resp_wait(uint32_t timeout)
{
UNUSED(timeout);
UTIL_SEQ_WaitEvt(1U << CFG_EVT_SYSTEM_HCI_CMD_EVT_RESP);
return;
}

I’ve tried to compare example ioc file and mine and can't find something

 

Could, someone, please help me find what I've missed?

1 ACCEPTED SOLUTION

Accepted Solutions
Ouadi
ST Employee

Hi,

From the IOC file, I noticed that the traces are not set correctly, so the program get stuck in the DbgTrace func.

When enabling Traces for Zigbee, please enable also the circular buffer as follow :

Ouadi_0-1742999707539.png

After generating the project, make sure to call the func Init_Debug() in MX_APPE_Init() to initialize the UART.

Hope this helps.

Best regards,

Ouadi

View solution in original post

3 REPLIES 3
Ouadi
ST Employee

Hi,

From the IOC file, I noticed that the traces are not set correctly, so the program get stuck in the DbgTrace func.

When enabling Traces for Zigbee, please enable also the circular buffer as follow :

Ouadi_0-1742999707539.png

After generating the project, make sure to call the func Init_Debug() in MX_APPE_Init() to initialize the UART.

Hope this helps.

Best regards,

Ouadi

Hm...thank you!
It really works!

It's strange, but if I use Init_Debug() inMX_APPE_Init(), I should fix the autogenerated MX_USART1_UART_Init from static to exportable function and move the definition to main.h.

CubeMX generates it as static function thus it can't be used from another file and I should fix it every time I have regenerate the code

Hi,

 MX_USART1_UART_Init is already called in the main and has not to be called in the app_entry.c, We will fix this issue in the upcoming release of CubeMX.

Best regards,

Ouadi