cancel
Showing results for 
Search instead for 
Did you mean: 

B-WB1M-WPAN1

pm_interrupt_vect
Associate III

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.

Steps I took:

  1. In IAR General Options, selected ST STM32WB1MMC.

  2. Copied the B-WB1M-WPAN1 folder into the BSP directory of the BLE_CableReplacement project.

  3. Added a reference in the preprocessor options.

  4. Removed stm32wbxx_nucleo.c from the project tree.

  5. Replaced it with b_wb1m_wpan1.c and commented out all instances of //#include "stm32wbxx_nucleo.h".

  6. 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.

  7. The system prompted me to copy b_wb1m_wpan1_conf.h into the Core → Inc directory. I did so.

  8. 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?

10 REPLIES 10
FilipKremen
ST Employee

Hello,

where is it stuck exactly? Can you please share a screenshot?

Thank you.

 

Best regards,

ST support

Hello.
A little later if possible. It's spinning somewhere in the sequencer. I didn't localize it yesterday

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.

FilipKremen
ST Employee

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

 

pm_interrupt_vect
Associate III

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.

FilipKremen
ST Employee

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

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!

FilipKremen
ST Employee

Hello,

I'm glad it's working. Please try to update the ST BLE Toolbox to the latest version.

 

Best regards,

ST support

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.