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.
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
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.
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
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
Hi Vic Lin,
Thanks MT_dialog
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.
Hi Vic Lin,
Thanks MT_dialog