694 views|7 replies

46

Posts

0

Resources
The OP
 

[NUCLEO-WB09KE Review] 2. Stuck BLE initialization [Copy link]

This post was last edited by dvacos on 2024-9-25 11:23
The purpose of this article: To open the WB0 series radio, the process is quite tortuous, so you still have to wait for the new product. The following is the relevant process
A failed attempt
I wanted to turn on the Bluetooth function, but found that the BLE component was gray and could not be turned on. It prompted me to enable "RADIO", so I started to work backwards step by step.
The conditions for opening RADIO are
RADIO TIMER
Click Agree to automatically adjust the clock.
Turn on the RADIO function
The BLE component prompts you to turn on security-related configurations
Follow the prompts to turn on security-related features
Note that there is a warning at RADIO in the above picture. I turned off uart1, then RADIO, then turned on RADIO, and then turned on uart1, and it worked. I don't know why.
Open BLE configuration as slave
Open Broadcast
Map the serial port as the debugging interface of the Bluetooth protocol stack.
After the code is generated, no matter how it is adjusted, it will be a compilation error.
And they are all errors involving .S, which cannot be checked
I compared the configuration of Cube MX with the example code. Even though they are exactly the same (what I compared and saw), the compilation still fails. It's very difficult and confusing.
Moreover, the WB0 series is too new and there is no documentation to refer to, so I don’t know where to start.
After being stuck for more than a week, I suddenly thought of updating the Cube MX to see if it could solve the problem.
Open the previous project and generate code again. The following figure shows whether to synchronize Cube MX related information when Cube MX is different.
The test found that the code generated by the old version of the project still failed to compile. After trying many times, I restarted the project and configured it again from the beginning. Finally!!! It compiled successfully!!
2. Set out again
Cube MX is configured again in version 6.12.1. Only pictures are shown below without adding text. If you want to see the text, please read the first section.
Three experiments
Finally compiled successfully
Refer to the example to add the broadcast-related code, but the broadcast still cannot be turned on, and the LOG will not be printed normally.
Even the simulation cannot run, so I plan to use routines to modify the Bluetooth related code first and move on.

This post is from RF/Wirelessly

Latest reply

This post was last edited by sujingliang on 2024-10-6 14:34 1. printf needs to be redirected 2. You may need to add the line around 540 in app_ble.c (it seems to have been added): /* USER CODE BEGIN APP_BLE_Init_4 */ APP_BLE_Procedure_Gap_Peripheral(PROC_GAP_PERIPH_ADVERTISE_START_FAST); /* USER CODE END APP_BLE_Init_4 */   Details Published on 2024-10-6 14:31
 

46

Posts

0

Resources
2
 

The last GIF can be played. I don’t know why it appears black, but it can be played normally after clicking the mouse.

This post is from RF/Wirelessly
 
 

46

Posts

0

Resources
3
 

If you find any wrong steps, please point them out, thank you!

This post is from RF/Wirelessly
 
 
 

6075

Posts

6

Resources
4
 

There should be a related usage file, such as what to initialize first and what to configure. I feel that ST should have this.

This post is from RF/Wirelessly

Comments

Yes, I found the document after my first try and followed it. The document is called “How to build a Bluetooth Low Energy application with STM32WB0 MCUs”. Link: https://www.st.com.cn/content/ccc/resource/te  Details Published on 2024-9-25 14:37
Personal signature

在爱好的道路上不断前进,在生活的迷雾中播撒光引

 
 
 

46

Posts

0

Resources
5
 
Qintianqintian0303 posted on 2024-9-25 13:12 There should be a related usage file, such as what to initialize first and what to configure. I feel that ST should have this

Yes, after my first attempt I found the document and followed it. The document is called “How to build a Bluetooth Low Energy application with STM32WB0 MCUs”

Link:

https://www.st.com.cn/content/ccc/resource/technical/document/application_note/group2/cd/20/91/44/a3/8a/47/34/DM00988117/files/DM00988117.pdf/ jcr:content/translations/en.DM00988117.pdf

This post is from RF/Wirelessly
 
 
 

13

Posts

0

Resources
6
 

The clock is wrong, it should be configured like above

This post is from RF/Wirelessly

Comments

But the example is not configured like this, and after I configured it [attachimg]846748[/attachimg] it still doesn't work, there is no LOG  Details Published on 2024-9-26 10:56
 
 
 

46

Posts

0

Resources
7
 
sujingliang posted on 2024-9-25 19:18 The clock is wrong, it should be configured like above

But this is not the configuration in the routine, and after I configure it

Still no work, not even LOG

This post is from RF/Wirelessly
 
 
 

13

Posts

0

Resources
8
 
This post was last edited by sujingliang on 2024-10-6 14:34

1. printf needs to be redirected

2. You may need to add the line around 540 in app_ble.c (it seems to have been added):

/* USER CODE BEGIN APP_BLE_Init_4 */
APP_BLE_Procedure_Gap_Peripheral(PROC_GAP_PERIPH_ADVERTISE_START_FAST);
/* USER CODE END APP_BLE_Init_4 */

This post is from RF/Wirelessly
 
 
 

Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

快速回复 返回顶部 Return list