2022-07-06 03:06 AM
Hello,
I'm doing a new board bring-up and following the document AN5503 (https://www.st.com/resource/en/application_note/an5503-bringing-up-the-bluenrglp-bluenrglps-devices-stmicroelectronics.pdf)
At chapter 4 (HS_Startup_time) I use the example firmware to compute this value but my results are very high according to the eval board.
UART results:
Last: 370. Worst: 654 (1596 us)
Last: 370. Worst: 654 (1596 us)
Last: 370. Worst: 654 (1596 us)
Last: 370. Worst: 654 (1596 us)
Last: 370. Worst: 654 (1596 us)
Last: 370. Worst: 654 (1596 us)
Last: 369. Worst: 654 (1596 us)
Last: 370. Worst: 654 (1596 us)
Last: 370. Worst: 654 (1596 us)
Last: 370. Worst: 654 (1596 us)
Last: 370. Worst: 654 (1596 us)
Last: 370. Worst: 654 (1596 us)
Last: 370. Worst: 654 (1596 us)
Last: 369. Worst: 654 (1596 us)
Last: 370. Worst: 654 (1596 us)
Last: 370. Worst: 654 (1596 us)
Last: 370. Worst: 654 (1596 us)
Last: 370. Worst: 654 (1596 us)
Last: 370. Worst: 654 (1596 us)
Last: 369. Worst: 654 (1596 us)
Last: 370. Worst: 654 (1596 us)
Last: 370. Worst: 654 (1596 us)
Last: 370. Worst: 654 (1596 us)
Last: 370. Worst: 654 (1596 us)
Last: 370. Worst: 654 (1596 us)
Last: 370. Worst: 654 (1596 us)
Last: 370. Worst: 654 (1596 us)
Last: 370. Worst: 654 (1596 us)
Oscilloscope results:
Theses two results are consistent and give me a HS_STARTUP_TIME of 1500*1.1*1.3=2145µs.
In examples codes this value is ""#define HS_STARTUP_TIME 320 // 780 us""
First question, why 320 is associated to 780µs?
Do you know what I can do to reduce this delay? We try to make a low power device.
PS: If I keep 320, BLE advertising after sleep does not work. If I increase this value to ""#define HS_STARTUP_TIME 640"", it's working.
Thank you.
2022-07-06 03:29 AM
I found the solution, I change this line according to my quartz:
system_BLUENRG_LP.c
LL_RCC_HSE_SetCurrentControl(LL_RCC_HSE_CURRENTMAX_5);