2025-05-04 1:34 PM
Colleagues,
I need to implement the BLE_CableReplacement project on the b_wb1m_wpan1 device. Since I don’t know the services of this project (the BLE_CableReplacement.ioc file is not included), I tried to adapt the project for the b_wb1m_wpan1 device in IAR.
In IAR General Options, selected ST STM32WB1MMC.
Copied the B-WB1M-WPAN1 folder into the BSP directory of the BLE_CableReplacement project.
Added a reference in the preprocessor options.
Removed stm32wbxx_nucleo.c from the project tree.
Replaced it with b_wb1m_wpan1.c and commented out all instances of //#include "stm32wbxx_nucleo.h".
Opened the standard set of files:
stm32wb55xx_flash_cm4.icf
startup_stm32wb55xx_cm4.s
system_stm32wbxx.c
Replaced their contents via clipboard with the corresponding files from the BLE_HR_p2p_Sensor project.
The system prompted me to copy b_wb1m_wpan1_conf.h into the Core → Inc directory. I did so.
Replaced all instances of DMA2_Channel4 with DMA1_Channel5.
After these changes, the project compiles but gets stuck at the MX_APPE_Process() function and shows no further signs of life.
Could you please advise:
What did I miss?
What would be a better approach?
2025-05-14 4:19 AM
Hello,
CFG_BLE_NUM_GATT_SERVICES is for setting the maximum number of services. There is only one user service in this example. Please try to use ST BLE Toolbox application.
How to build wireless applications with STM32WB MCUs - Application note
Also, these links below could be helpful.
Migrating from STM32WB1x/5x to STM32WB1x/5x MCUs microcontrollers - Application note
STM32WB_Workshop_Presentation.pdf
Best regards,
ST support
2025-06-25 11:54 AM
Dear colleagues.
Continuing to understand the BLE_CableReplacement application, I would like to inform you that if you enable USART buffering, you can transmit not only one character from the console, but also the entire 20-byte string.
However, I would like to use DMA when receiving and transmitting fixed-length packets.
The example is written in such a way that USART DMA is used only to output debug information, which is recommended to be disabled in low-power mode.
HW_UART_Transmit(CFG_CONSOLE_MENU, (uint8_t*)&StrToDisp[jj++], 1, 0xFFFFFFFF) is used to transmit data, and DMA is not even initialized when CFG_DEBUG_TRACE = 0.
I would like to see a standard solution from the developers for using DMA in LPM mode, as, for example, it is implemented and described in AN5406 paragraph 8.5 for the LoRa® application.
The utility provides hooks to be implemented to forbid the system to enter Stop or lower mode while the DMA isactive:
• void UTIL_ADV_TRACE_PreSendHook (void)
{ UTIL_LPM_SetStopMode((1 << CFG_LPM_UART_TX_Id) , UTIL_LPM_DISABLE ); }
• void UTIL_ADV_TRACE_PostSendHook (void)
{ UTIL_LPM_SetStopMode((1 << CFG_LPM_UART_TX_Id) , UTIL_LPM_ENABLE );}