Burning BD address to OTP header

⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at https://www.dialog-semiconductor.com/support . We’ll be fixing bugs / optimising the searching and tagging over the coming days.
4 posts / 0 new
Last post
posciamelo
Offline
Last seen: 1 year 2 weeks ago
Joined: 2020-06-08 07:18
Burning BD address to OTP header

Dear Dialog,

I want to burn the BD address to the OTP header. However I can see 8 bytes rather than 6 can be written. Could you please provide guidelines on how this is done?

Also, do the SDK automatically reads the BD address from the OTP header once written? Or do I have to change any other settings?

Thanks 

LC_Dialog
Offline
Last seen: 7 months 4 weeks ago
Staff
Joined: 2016-09-19 23:20
Hi posciamelo,

Hi posciamelo,

You can program the BD address at the address 0x7FD4 in the OTP header by using the OTP programmer in the SmartSnippets toolbox or using our Production Line Tool (PLT) if you are thinking about this in production.

To read the BD address from the OTP, please follow the instruction in this post for general details. The instructions are provided for our 68x platform, but it will get you started on where to look for the APIs.

Below is a snippet for the SDK6 to read BD address the OTP:

static void read_otp_header(void)
{
    hw_otpc_init();
    hw_otpc_manual_read_on(false);

    // Read BD device address
    memcpy(&dev_bdaddr, (uint8_t *) OTP_HDR_BDADDR_ADDR, sizeof(dev_bdaddr));  ///Reading the DEVICE ADDRESS from the OTP header
    …
}

Best,
LC_Dialog

 

PM_Dialog
Offline
Last seen: 1 month 5 days ago
Staff
Joined: 2018-02-08 11:03
Thanks to LC_Dialog for the

Thanks to LC_Dialog for the reply.

I’d like to highlight that this procedure is for DA1531 SoC and not for DA14531MOD ( as tagged into the initial post ) because the module comes with a pre-programmed BD Address. Please see below

So, the described procedure is very good reference for the DA14531 users.

Hi posciamelo,

Since you are using the DA14531 TINY module, please note that the module has as Dialog Public BD Address pre-preprogrammed in the OTP header. You can easily check this out with the SS Toolbox : read the OTP Header and you will find that the value of the Bluetooth Device Address is not empty . In the system initialization - system_init() – the SDK reads the BD Address from the OTP Header - otp_hdr_get_bd_address(). If the BD address is blank, then it takes the BD Address from the nvds_data_storage().

If you would like to set your own BD Address, a possible solution might be to set it in the OTP (not in the specific filed on the OTP Header as it is already programmed )or FLASH and then to have changed the code to set this in the BLE application code.

Thanks, PM_Dialog

posciamelo
Offline
Last seen: 1 year 2 weeks ago
Joined: 2020-06-08 07:18
Thank you both for your

Thank you both for your answer. Good to hear that the DA14531MOD already comes with a registered public BD and I do not need to set it up.

Cheers