Change BD address when FW is burned to SPI flash

⚠️
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//www.wsdof.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
8 posts / 0 new
Last post
Vic Lin
Offline
Last seen:3 years 2 months ago
Joined:2016-03-31 03:11
Change BD address when FW is burned to SPI flash

Because we want to modify the BD address in DA14580 when FW is burned to SPI flash, how can we do this?
(Let every device have the different BD address.)

Method 1:
We burn FW in SPI flash. If it is possible, can we modify the BD adress by modifing the BD address of hex file? (Do not compile again.)
如果我们能做到这一点,请让我们知道to do.

Method 2:
We burn FW in SPI flash. And then change the BD address from OTP.
But we just want to change the BD address and do not use other setting in OTP. How can we do?
Can you provide the burned OTP file and command line method in SmartSniooets Toolbox v4.7.3.1690? (Jtag port)
We will directly burn that OTP file from Dialog.
(hope to provide the method to us step by step.)

If you have other better method to change BD address when FW is burned to SPI flash, please help to tell us.
Thanks.

Device:
MT_dialog
Offline
Last seen:1 month 3 weeks ago
Staff
Joined:2015-06-08 11:34
Hi Vic Lin,

Hi Vic Lin,

580年,没有一个flash当编译the SDK for a 580, the options to change the bd address per device is through the NVDS which can either be populated via the OTP or the fw donwloaded. Now if you are using an external flash you will have to modify the SDK in order to read the bd address from the flash, this method exists for the 583 which has an internal flash on board. How the 583 does it, you will be able to find it in the nvds_read_bdaddr() function that is invoked in the system_init() function. The function that reads the flash of the 583 is the nvds_read_bdaddr_from_da14583_flash(). The code in the nvds_read_bdaddr_from_da14583_flash() will look for a product header in a specified address in the flash and check in the specified offset if the value is other than zeros. If tha value is valid it will take that value and apply it to the dev_bdaddr variable which is used to set the bd address of the device. So by implementing something similar and burning each device's flash in that offset with a different db address will allow you to have a different address for each device read from the flash.

Thanks MT_Dialog

Vic Lin
Offline
Last seen:3 years 2 months ago
Joined:2016-03-31 03:11
So we must modify the code by

So we must modify the code by imitating the mentioned DA14583 code and can not directly use the mentioned DA14583 function if we want to change BD address from SPI flash.
But by this method, how can we add the new BD address in the SPI flash? As I know, the SmartSnippets will check the checksum when we burn the hex file to the SPI flash.

However, how about "method 2"? Maybe it is simple method.

MT_dialog
Offline
Last seen:1 month 3 weeks ago
Staff
Joined:2015-06-08 11:34
Hi Vic Lin,

Hi Vic Lin,

The code for taking the bd address from the spi flash on the 580 would be identical to the 583 but you will have remove the 583 definitions in order to include the code into the build, alter function names change the pins of the default 583 flash to your flash settings etc. But as an implementation will be the same. Using the Smart Snippets you could use the Propriety Header Programmer in order to create the header and burn the created header in the flash. Also this header will be on different address in the flash SS will check that whatever was instructed to be downloaded is downloaded properly.

Regarding the 2nd method, it would require to burn the OTP header, i had the impression that you wouldn't want to burn the OTP at all, but if its ok for you to burn the OTP then the SDK will read the OTP bd address value without any modification. In order to do that all you need to do is just burn the bd address in the OTP header in the Device unique ID fields (Smart Snippets "OTP Header" tool). That is all you have to do to for the device to obtain the bd address from the OTP, you dont need to change anything else. If you would like to use command line for this, check in the Smart Snippets the help option, and open the User manual. In the User manual you will be able to find the cli commands for burning the OTP.

Thanks MT_dialog

Vic Lin
Offline
Last seen:3 years 2 months ago
Joined:2016-03-31 03:11
For method 1:

For method 1:
Can you provide the burned file when using Proprietary Header Programmer?
Every device have the same burned file (The only difference is the BD address). Is it right?
Which position in SPI flash should we burn the FW and header?

For method 2:
It means we can change the BD address by following steps and do not have side effect. Is it right?
Step1: Read the OTP header from the DA14580.
Step2: Modify BD address in "Device unique ID" of the read OTP header.
Step3: Write this modified OTP header to the DA14580.

Thanks

MT_dialog
Offline
Last seen:1 month 3 weeks ago
Staff
Joined:2015-06-08 11:34
Hi Vic Lin,

Hi Vic Lin,

  1. Please find attached a .txt file of an example how the product header could be, you can load that in the Proprietary Header Programmer tool and fill in the data that you would like and then burn it to the flash. Every device should be burned with that header but with different bd address. The default address that the SDK will check is 0x1F000 but its up to the user to decide.
  2. It means that you can burn the OTP header field that i have specified above with the Smart Snippets tool without modifying anything else in the header and the SDK will check that specific field when the system starts up and its time to pick a bd address. The specified OTP header field is the first location that the SDK will check when it will try to populate the bd address.

Thanks MT_dialog

Attachment:
Vic Lin
Offline
Last seen:3 years 2 months ago
Joined:2016-03-31 03:11
For Method 1 (change BD

For Method 1 (change BD address by SPI flash):
We only need to modify the following "112233445566" in your attached file. Other items can be keeped as original (no value). Is it right?
6 String bd_address BD address 112233445566

For Method 2 (change BD address by OTP header):
If we do not change anything in OTP header, we can not change BD address by OTP header.
So I think we should change the BD address by following steps and there is no side effect. Is it right?
Step1: Read the OTP header from the DA14580.
Step2: Modify BD address in "Device unique ID" of the read OTP header.
Step3: Write this modified OTP header to the DA14580.

Thanks.

MT_dialog
Offline
Last seen:1 month 3 weeks ago
Staff
Joined:2015-06-08 11:34
Hi Vic Lin,

Hi Vic Lin,

  1. Besides the bd address field you will need also to populate the signature header with the 0x7052 in order for the fw to confirm that this is a valid product header.
  2. I dont understand the question, in order to burn the OTP header in the specified field that the SDK reads as a bd address, you will have to use the Smart Snippets tool, and apply the VPP voltage in order to burn the OTP header. So the steps that you should follow to do that is:
    1. Hit the connect in order for the fw that will burn the OTP header will be downloaded, this will automatically also read the contents of the memory.
    2. Change the two "Device unique ID" fields that set the bd address of the device.
    3. Hit the "Burn" button in order for the value to be burned in the field, and you should be good to go.

Thanks MT_dialog