cancel
Showing results for 
Search instead for 
Did you mean: 

STM32WB LSE vs LSI2

LSpad.1
Associate III

Hi!

I am using a STM32WB for a bluetooth very low cost application. Right now i have ported in my board with STM32WB50CGU the example P2P server and the Android application ST BLE Sensor connect and communicate with it. I am using the LSE clock (32.768kHz).

Now, according with datasheet of the STM32WB50CG, paragraph 3.10, point 3, the LSI2 can be used by the RF subsystem, so, in order to reduce the cost of the board, i tryed it.

I can see the advertising with the mobile app (it appears in the research), but unfortunately i cannot connect and exchange data with the board. I attach the cube clock configuration.

Am i doing something wrong? How can i solve this problem?

Thank you in advance

Best regards

Lorenzo

17 REPLIES 17
Vvnfh.1
Associate

Bro i faced the same problem with this app and i still cant found its solution yet like youtube is full of solutions but in this case there is no solution available if someone has the solution plz help me I never faced this problem if i have some buying guide.

​Hello,

Could you please describe your problem ?

To summarize what was said above, for correct BLE operation, you shall use either LSE or HSE/1024 as RfWakeupClockSource.

When HSE/1024 is used, you shall :

1/ set HSEON bit to 1 at startup of the CPU1 side before starting CPU2

2/ never enter deep sleep mode ( as this will switch Off the HSE and the BLE timing will be lost

Regards.

LSpad.1
Associate III

Hi,

Right now I do not have any other problem with this point in my application. I am HSE/1000 for RF and soon i will try to remove the LSE from the RTC clock.

So you were able to connect to your BLE device when setting PeriphClkInitStruct.RFWakeUpClockSelection = RCC_RFWKPCLKSOURCE_HSE_DIV1024? I've tried it and while I can see it advertising, it won't connect. Is there another change I need to make? I actually have an LSE on my board but it's failing when the device is experiencing cold temperatures. The 32 MHz HSE seems much more reliable under these conditions so I was interested if I could use it instead, despite all of the documentation saying LSE is required for BLE. Thanks.

Hello,

Please, make sure :

CFG_BLE_LSE_SOURCE is set to 1 and the device is never entering Stop Mode ?

Regards.

You will need also to redefine

CFG_BLE_LSE_SOURCE=1

L

That works now. Thank you. I'm also redesigning my LSE circuit to try make it work the "correct" way but it's nice to have a back-up option. So what's the downside of never entering Stop Mode? Just significantly more battery usage?

Hello,

Yes, not going to Stop mode is only a matter of battery usage

You may use Sleep mode which at least will stop the CPU running and will save some power

Regards