Change BD address when FW is burned to SPI flash

学到更多FAQsTutorials

8个帖子/ 0新
Last post
Vic Lin
Offline
Last seen:2年11个月前
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:
我们在SPI闪光灯中燃烧FW。如果有可能,我们可以通过修改十六进制文件的BD地址来修改BD地址吗?(不要再编译。)
如果我们能做到这一点,请让我们知道to do.

Method 2:
我们在SPI闪光灯中燃烧FW。And then change the BD address from OTP.
但我们只是想更改BD地址,不要在OTP中使用其他设置。我们怎样呢?
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.
谢谢。

设备:
MT_dialog
Offline
Last seen:14 hours 49 min ago
Staff
Joined:2015-06-08 11:34
嗨Vic Lin,

嗨Vic Lin,

The 580, doesn't have a flash so when compiling 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.

谢谢mt_dialog.

Vic Lin
Offline
Last seen:2年11个月前
Joined:2016-03-31 03:11
So we must modify the code by

因此,如果我们想从SPI Flash更改BD地址,我们必须通过模仿DA14583代码来修改代码来修改代码。
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.

但是,“方法2”怎么样?也许这是简单的方法。

MT_dialog
Offline
Last seen:14 hours 49 min ago
Staff
Joined:2015-06-08 11:34
嗨Vic Lin,

嗨Vic Lin,

从SPI Flash从580上获取BD地址的代码将与583相同,但您将删除583个定义,以便将代码包含在构建中,更改函数名称更改默认583闪存的引脚您的闪光设置等。但作为一个实现将是相同的。使用智能片段,您可以使用Pricigtifiess Header Programmer来创建标题并刻录Flash中的创建标题。此页面也将在Flash SS中的不同地址上检查是否正确下载了所示的任何指示。

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.

谢谢MT_dialog

Vic Lin
Offline
Last seen:2年11个月前
Joined:2016-03-31 03:11
对于方法1:

对于方法1:
Can you provide the burned file when using Proprietary Header Programmer?
每个设备都具有相同的刻录文件(唯一的区别是BD地址)。这样对吗?
我们应该燃烧哪个位置,我们应该烧掉FW和标题吗?

对于方法2:
这意味着我们可以按照以下步骤更改BD地址,并且没有副作用。这样对吗?
Step1: Read the OTP header from the DA14580.
步骤2:在“读取OTP”标题的“设备唯一ID”中修改BD地址。
Step3: Write this modified OTP header to the DA14580.

谢谢

MT_dialog
Offline
Last seen:14 hours 49 min ago
Staff
Joined:2015-06-08 11:34
嗨Vic Lin,

嗨Vic Lin,

  1. 请查找附加的一个示例的一个.txt文件,您可以在专有的标题程序员工具中加载它,并填写您想要的数据,然后将其刻录到闪光灯中。每个设备都应该用该标题刻录,但使用不同的BD地址。SDK将检查的默认地址为0x1f000,但它可以决定。
  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.

谢谢MT_dialog

Attachment:
Vic Lin
Offline
Last seen:2年11个月前
Joined:2016-03-31 03:11
For Method 1 (change BD

对于方法1(通过SPI闪存更改BD地址):
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):
如果我们在OTP标题中没有更改任何内容,我们无法通过OTP标头更改BD地址。
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.
步骤2:在“读取OTP”标题的“设备唯一ID”中修改BD地址。
Step3: Write this modified OTP header to the DA14580.

谢谢。

MT_dialog
Offline
Last seen:14 hours 49 min ago
Staff
Joined:2015-06-08 11:34
嗨Vic Lin,

嗨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. 点击连接按顺序为将刻录OTP标题的FW下载,这将自动读取内存的内容。
    2. 更改设置设备BD地址的两个“设备唯一ID”字段。
    3. Hit the "Burn" button in order for the value to be burned in the field, and you should be good to go.

谢谢MT_dialog