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-05 3:31 AM
Hello,
where is it stuck exactly? Can you please share a screenshot?
Thank you.
Best regards,
ST support
2025-05-05 4:19 AM
Hello.
A little later if possible. It's spinning somewhere in the sequencer. I didn't localize it yesterday
2025-05-05 12:23 PM
Hello, FilipKremen
After launching, the project gives me the following information in the COM port. See attachment.
After that, at any stop, I get into the function void UTIL_SEQ_Run( UTIL_SEQ_bm_t Mask_bm ) line 207 of the file stm32_seq.c.
At the same time, I do not see ads on the smartphone in the ST BLE Toolbox application.
2025-05-06 4:24 AM
Hello,
according to the return value 0x7 (Memory Capacity Exceeded), there isn't sufficient amount of resources.
Please try to change the parameters as it's mentioned in this topic. (app_conf.h file)
Solved: STM32WB Fails on SHCI_C2_BLE_Init - STMicroelectronics Community
Best regards,
ST support
2025-05-06 1:47 PM
Hello, PhilipKremen.
It didn't work out quickly and easily.
I tried changing the BLE Stack parameters in the app_conf.h file both from the screenshot at the end of the link you provided and from the BLE_HR_p2p_Sensor project for B-WB1M-WPAN1.
The critical ones are:
#define CFG_BLE_NUM_GATT_SERVICES 8
#define CFG_BLE_NUM_GATT_ATTRIBUTES 30
If I decrease the first one, I will have to increase the second one.
Otherwise debugging will fail with the output
[app_entry.c][APPE_SysEvtReadyProcessing][479] >>== WIRELESS_FW_RUNNING
[app_entry.c]
With the configuration above and changing other parameters the result will remain the same
[app_ble.c][APP_BLE_Init][353] Error: SHCI_C2_BLE_Init command, result: 0x07
I could try creating a new project for B-WB1M-WPAN1, but the BLE_CableReplacement example does not have an .ioc file.
Best regards.
2025-05-12 7:38 AM
Hello,
if you set #define CFG_BLE_NUM_GATT_SERVICES 4 and #define CFG_BLE_NUM_GATT_ATTRIBUTES 30, does it work?
Best regards,
ST support
2025-05-12 1:42 PM
Thank you very much, PhilipKremen.
I thought that if debug information is not fully output to the console, then the application does not work.
After your words, I checked it works both for reception and transmission.
However, if you transmit a large string from a smartphone, the ST BLE Toolbox application freezes and terminates.
There are a lot of questions about the transmission speed and other parameters, but it's a matter of time.
The main thing is that it basically worked.
#define CFG_BLE_NUM_LINK 2
#define CFG_BLE_NUM_GATT_SERVICES 4
#define CFG_BLE_NUM_GATT_ATTRIBUTES 30
#define CFG_BLE_MAX_ATT_MTU (156)
#define CFG_BLE_ATT_VALUE_ARRAY_SIZE (1344)
Again, thank you very much!
2025-05-13 12:27 AM
Hello,
I'm glad it's working. Please try to update the ST BLE Toolbox to the latest version.
Best regards,
ST support
2025-05-13 1:42 PM
Hello, FilipKremen.
We have reduced the number of services from 8 to 4.
And what services have we excluded?
I tried to find the code defining the services, but I found nothing except the main service in the crs_stm.c file (void CRS_STM_Init(void), 0000fe11-8e22-4541-9d4c-21edae82ed19).
I launched the nRF Connect program, connected and did not find the latter there.
There are two standard ones and one additional one, not at all similar to our CRS.
I really want to figure out how it all works... Where can I read about it?
But if it takes too long, then I will simply rework the COM port functions. )))
Best regards.