We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 60d2609 commit dd8fff7Copy full SHA for dd8fff7
src/utility/HCISharedMemTransport.cpp
@@ -20,6 +20,7 @@
20
21
#include "HCISharedMemTransport.h"
22
#include "STM32Cube_FW/hw.h"
23
+#include "otp.h"
24
25
/* Private variables ---------------------------------------------------------*/
26
PLACE_IN_SECTION("MB_MEM1") ALIGN(4) static TL_CmdPacket_t BleCmdBuffer;
@@ -338,8 +339,14 @@ static bool get_bd_address(uint8_t *bd_addr)
338
339
340
bd_found = true;
341
} else {
- bd_addr = NULL;
342
- bd_found = false;
+ uint8_t *otp_addr = OTP_Read(0);
343
+ if (otp_addr) {
344
+ memcpy(bd_addr, otp_addr, CONFIG_DATA_PUBADDR_LEN);
345
+ bd_found = true;
346
+ } else {
347
+ bd_addr = NULL;
348
+ bd_found = false;
349
+ }
350
}
351
352
return bd_found;
0 commit comments