2023-03-18 08:38 AM
I am using nucleo STM32WB55RG to build an BLE application.
I am having a very weird issue.
At first I create an BLE application using CubeMX.
I used server profile with custom template enabled (You can refer to attached cubemx file .ioc)
The application will start advertising after all setup and init.
I used an android phone with nRF Connect installed on it to scan advertising node.
When I build and debug bare project (project generated from cubeMX without any modification), android phone can successfully see the device (nucleo stm32wb board) advertising.
---> HOWEVER, WHEN I UNPLUGED THE BOARD AND PLUG IT AGAIN (DISCONNECT FROM POWER SOURCE AND CONNECT AGAIN), THE BOARD SENDS ALL DEBUG INFO WITH SUCCESS VIA UART (DEBUG MODE IS ENABLED)
BUT THE PHONE CAN NOT SCAN THE BOARD SUCCESSFULLY.
--> Additional info: when I program the board with BLE_p2pServer example, the above issue did NOT occur@@
Please help me with this problem!!!
Thank you very much
Solved! Go to Solution.
2023-04-28 12:12 AM
Hello,
In your linker file, there is an extra dot for MB_MEM2 section:
*(.MB_MEM2) ; instead of *(MB_MEM2) ;
Due to this, the buffers that need to be in SRAM2 are not placed there, so your application doesn't work. It's a typo inside STM32cubeIDE template. It will be corrected in the next release.
Best Regards
2023-04-26 09:46 AM
Hello,
Which IDE are you using? If you are using STM32CubeIDE, can you share your linker script (STM32WB55RGVX_FLASH.ld) ?
Best Regards
2023-04-27 08:33 PM
I'm having what I think is the same issue on STM32WB5MMG. Main application runs just fine in either case (debugger start or cold boot), but when booting from a power cycle rather than starting using the debugger, the device does not appear to advertise. Linker file attached.
Sorry, I should clarify, I'm using STM32CubeIDE v1.12.0 on Linux and CubeMx 6.8.0
2023-04-28 12:12 AM
Hello,
In your linker file, there is an extra dot for MB_MEM2 section:
*(.MB_MEM2) ; instead of *(MB_MEM2) ;
Due to this, the buffers that need to be in SRAM2 are not placed there, so your application doesn't work. It's a typo inside STM32cubeIDE template. It will be corrected in the next release.
Best Regards
2023-04-28 10:10 AM
Awesome, that worked. Thank you!