cancel
Showing results for 
Search instead for 
Did you mean: 

HardFault occurs while trying to run STM32WB55 BLE examples on custom board.

MTriv.2
Associate II

Hi all,

I have my own customized board based on STM32WB55RGV6. The board has HSE of 32 MHZ but don't have LSE. I am using LSI or (HSE/32) as RTC clock and HSE/1024 as RF wakeup clock. I am facing two different problems.

Case 1: First I tried with examples of BLE including BLE_P2P_Server, BLE_Custom and BLE_HeartRate from CubeMX. (Only change I did is disabled the LSE and hence LPM (low power mode) and relevant clock source setting). When I downloaded and tried to run the application, I always get HardFault from MX_APPE_Process(); more specifically when executing following

/* Execute the task */

  TaskCb[CurrentTaskIdx]( );

Case 2: Then after I tried to develop a project on CubeMX from scratch by selecting STM32WB55RGV6 chip (Not Nucleo board). I just made bare minimum settings with HeartRate sensor service just to see if it runs or not.

After downloading and running, I can see my device in ST BLE Toolbox android app but when I try to connect it with board, it doesn't get connected and gives an error like "An error occurred during connection".

I have attached few screenshots of the case 2 and I tried almost everything. what is wrong in case 1 as well as in case 2 ?

Note: I don't have even UART connection on the board so I can't see the trace on terminal. I kept trace disabled.

Kindly help me out.0693W00000QM1HpQAL.png0693W00000QM1HkQAL.png0693W00000QM1HfQAL.png0693W00000QM1HVQA1.png0693W00000QM1HQQA1.png0693W00000QM1HLQA1.png0693W00000QM1HGQA1.png0693W00000QM1H6QAL.png0693W00000QM1HuQAL.jpg 

1 ACCEPTED SOLUTION

Accepted Solutions
Remy ISSALYS
ST Employee

Hello,

Can you give the version of CubeMX and STM32CubeWB package you are using ?

Ensure you have the following configuration for CFG_BLE_LSE_SOURCE define in app_conf.h file:

 #define CFG_BLE_LSE_SOURCE  (SHCI_C2_BLE_INIT_CFG_BLE_LSE_CALIB | SHCI_C2_BLE_INIT_CFG_BLE_LSE_OTHER_DEV)

Best Regards

View solution in original post

2 REPLIES 2
Remy ISSALYS
ST Employee

Hello,

Can you give the version of CubeMX and STM32CubeWB package you are using ?

Ensure you have the following configuration for CFG_BLE_LSE_SOURCE define in app_conf.h file:

 #define CFG_BLE_LSE_SOURCE  (SHCI_C2_BLE_INIT_CFG_BLE_LSE_CALIB | SHCI_C2_BLE_INIT_CFG_BLE_LSE_OTHER_DEV)

Best Regards

Thank you so much @Remy ISSALYS​  this really solved the issue. I forgot to enable calibration for the clock...