2025-03-20 12:10 AM - edited 2025-03-20 12:17 AM
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?
Solved! Go to Solution.
2025-03-26 7:37 AM - edited 2025-03-27 8:38 AM
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 :
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
2025-03-26 7:37 AM - edited 2025-03-27 8:38 AM
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 :
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
2025-03-26 4:09 PM
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
2025-03-27 2:51 AM
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