Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit870c91e

Browse files
committed
Set a new bd address for the BLE device
In case the bd address cannot be computed from the flashthen the otp is read to provide a valid one in a OTP_BT_tSigned-off-by: Francois Ramu <francois.ramu@st.com>
1 parent60d2609 commit870c91e

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

‎src/utility/HCISharedMemTransport.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
#include"HCISharedMemTransport.h"
2222
#include"STM32Cube_FW/hw.h"
23+
#include"otp.h"
2324

2425
/* Private variables ---------------------------------------------------------*/
2526
PLACE_IN_SECTION("MB_MEM1") ALIGN(4) static TL_CmdPacket_t BleCmdBuffer;
@@ -338,8 +339,13 @@ static bool get_bd_address(uint8_t *bd_addr)
338339

339340
bd_found =true;
340341
}else {
341-
bd_addr =NULL;
342-
bd_found =false;
342+
OTP_BT_t *p_otp = (OTP_BT_t *)OTP_Read(0);
343+
if (p_otp) {
344+
memcpy(bd_addr, p_otp->bd_address, CONFIG_DATA_PUBADDR_LEN);
345+
bd_found =true;
346+
}else {
347+
bd_found =false;
348+
}
343349
}
344350

345351
return bd_found;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp