cancel
Showing results for 
Search instead for 
Did you mean: 

STM32WB5MMG problems

Lep
Senior

I made a Demo using STM32WB5MMG to communicate with USB dongle or phone (BLE notification),AND I collect data from the MAX30001 (two interrupt pins PC10 and PC11, SPI1 communication) and the MAX30112 chip (interrupt pin PD0, I2C3 communication) by triggering the falling edge interrupt. But I have found some problems that are difficult to solve.

Problem Description:

1. I have run the official routine BLE_HeartRate. It works perfectly fine.

2. My program can run normally only when it is downloaded for the first time. When it is powered on again, the demo does not work properly.

3. If I add APPD_Init() in the MX_APPE_Init() function and the CFG_DEBUGGER_SUPPORTED is 0, I can collect data from the MAX30112 normally (it is also normal to restart after a power outage) and send it via Bluetooth. But there is no news about MAX30001 at all, and I am not sure what the problem is. 

4.For this reason, I went to check the APPD_Init() function, and I found that the program with the greatest impact was __HAL_RCC_GPIOB_CLK_DISABLE() (shown in the picture on the upper). Commenting out this statement, I will only download the program normally for the first time; without commenting the statement, I can only receive data from MAX30112 via Bluetooth, MAX30001 will fail, and it will be normal for the second power-on. The picture below shows my GPIO settings.

5.Additionally, I used SWV for debugging (without adding Bluetooth), just wired output, and it worked normally.

Lep_0-1713755444199.pngLep_1-1713755452567.png

 

 

 

5 REPLIES 5
Judo
Associate II

Hello Lep,

 

To get into details of your issue in depth, it would be better if you can share your project files.
Before that, are you successfully able to get data from MAX30001? or it is only with MAX30112 ?

Are libraries for MAX30001 initialized properly, and you are successfully able to establish SPI communication between sensors?

Regards,
Judo

1

Judo
Associate II

Hi Lep,
I wanted to know why you have initialized the GPIO A 11 pin. May I know its purpose.

Just a red led.Mainly used to indicate some functions, of course this part can be turned off.

Is there any follow-up please? Or is there anything else that needs to be added to this question?