⚠️
大家好. .谢谢光临论坛。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.
22 posts / 0 new
Last post
Rajapurerohit
Offline
Last seen:9 months 2 weeks ago
加入:2017-04-20 09:17
DA1458X Mass production

Hi All,

Can anyone help me with how to program the DA1458x mass devices? I am in the production state of my few devices.

And I have one doubt regarding assigning mass BDA to devices,

In my project, I have used BDA as one of the parameters, using that I am performing some controlling operation. So in the mass production time will that affect my project.

means, for example param_data[23] == nvds_data_ptr->NVDS_TAG_BD_ADDRESS[2] Here, I have used one byte of the BDA for my operation. So in mass production time what all need to consider regarding BDA with respect to DA14580 and DA14583.

感谢致敬

Rohit R.

Device:
PM_Dialog
Offline
Last seen:3 hours 2 min ago
Staff
加入:2018-02-08 11:03
Hi Rohit,

Hi Rohit,

For mass production, please check the Production Line Tool (PLT). Up to 16 devices can be connected..

//www.wsdof.com/products/production-line-tool

Are you using this tool for the production?

Thanks, PM_Dialog

Rajapurerohit
Offline
Last seen:9 months 2 weeks ago
加入:2017-04-20 09:17
嗨PM_DIALOG.,

嗨PM_DIALOG.,

Okay, Thank you for the response.

Yes, I am going to use this tool for production.

What about my doubt regarding the BDA. Is there any effect on code? Will it work without any changes in code?

感谢致敬

Rohit R.

PM_Dialog
Offline
Last seen:3 hours 2 min ago
Staff
加入:2018-02-08 11:03
Hi Rohit,

Hi Rohit,

Please check section 7.2.4 BD Addresses from the following document.

//www.wsdof.com/sites/default/files/um-b-041_da1458x_da1468x_production_line_tool_4v2.pdf

Could you please clarify what you would like to accomplish with BD address? What is your requirement in production?

Thanks, PM_Dialog

Rajapurerohit
Offline
Last seen:9 months 2 weeks ago
加入:2017-04-20 09:17
嗨PM_DIALOG.,

嗨PM_DIALOG.,

Thank you for the feedback,

Okay, so I have designed 2 product. Product A and B, using Product B we are controlling Product A. So for controlling and identifying which device I used BDA of the devices using nvds_data_ptr->NVDS_TAG_BD_ADDRESS[2] structure. I am using out of 6 bytes of BDA I kept the first three bytes common and the other 3 bytes keep changing as the number of devices.

So my question is, if during production procedure after assigning BDA to devices will it affect my code? If yes, then what all things to take care of during the assignment of BDA so that with minimal changes my code should work as it is.

And I also like to know what is the effect of programming device using OTP method as well as flash?

感谢致敬

Rohit R.

PM_Dialog
Offline
Last seen:3 hours 2 min ago
Staff
加入:2018-02-08 11:03
Hi Rohit,

Hi Rohit,

When the PLT is used, the BD address will be programmed into the OTP Header. After that, the device will get the BD address of the OTP Header, so any other BD address in the NVDS or in application code will be ignored. During production, the code will not be affected, but as mentioned before the PLT will write the OTP header with the appropriate BD address. Regarding your last question, could you please clarify it? Please note that the OTP stands for One-Time-Programmable, thus it cannot be written multiple times.

Thanks, PM_Dialog

Rajapurerohit
Offline
Last seen:9 months 2 weeks ago
加入:2017-04-20 09:17
嗨PM_DIALOG.,

嗨PM_DIALOG.,

"When the PLT is used, the BD address will be programmed into the OTP Header. After that,
the device will get the BD address of the OTP Header, so any other BD address in the NVDS
或在应用程序代码将被忽略”So, If I am using OTP for production then NVDS structure for BDA will be ignored
and If I want to use BDA as it required for my operation then I have to map OTP BDA to my logic correct?

If yes, then could you please share how to map OTP BDA? means if there is an example where someone used this method.

And What is the effect If I am using Flash for production? Please explain to me how you have cleared the point regarding OTP.
Because for some production, I may use DA14580 MCU so there OTP is necessary as per my knowledge
, and for some product, I am using DA14583 so here I am going to use flash. So please let me know what is BDA effect over using flash.

"During production, the code will not be affected,
但如前所述,PLT将使用适当的BD地址写入OTP标题“
-Okay, but if the OTP header is using for BDA then my NVDS structure will not effect I need to change my code in case of BDA access and operation.

感谢致敬

Rohit R.

PM_Dialog
Offline
Last seen:3 hours 2 min ago
Staff
加入:2018-02-08 11:03
Hi Rohit,

Hi Rohit,

If you are planning to use the PLT for the production, and in case you want to burn the BD address through the PLT, the BD address will be stored in the appropriate field of the OTP Header. This field can but burnt without the PLT as well, so if you have plenty of boards you can do some tests. You can use the use the SmartSnippets Toolbox to read and write the OTP Header.

>>>And What is the effect If I am using Flash for production?

In case of the BD address is programmed to the OTP Header? So, if I understood correctly you are using a DA14580 and a DA14583 in your design, Do you want to program both through the PLT (assume with different fw) ? And what about the BD address?

Thanks, PM_Dialog

Rajapurerohit
Offline
Last seen:9 months 2 weeks ago
加入:2017-04-20 09:17
嗨PM_DIALOG.,

嗨PM_DIALOG.,

Thank you for the feedback,

>>>And What is the effect If I am using Flash for production? -意味着,对于某些产品,我使用DA14583 MCU,我有闪存选项,所以使用PLT并通过它写BDA,然后将BDA写入OTP标题或它将在NVDS结构中写入NVDS结构(NVDS_TAG_BD_ADDRESS)。

Because, in development phase we have used DA14583 and here I have accessed BDA through NVDS and using SmartSnippet I have just burned .hex file into device and tested.

So when I use PLT what is the effect on DA1583?

>>>In case of the BD address is programmed to the OTP Header? So, if I understood correctly you are using a DA14580 and a DA14583 in your design, Do you want to program both through the PLT (assume with different fw) ? And what about the BD address? -yes, I am using both DA14580 and DA14583 because few product are designed for DA14580 and few are for DA14583 MCU. Yes, Different firmware.

So, I want to know how to access BDA from the OTP header and what all i need to change in my code to access the same in place of NVDS_TAG_BD_ADDRESS?.(for example - param_data[23] == nvds_data_ptr->NVDS_TAG_BD_ADDRESS[2])

and also, if I use DA14583 and burn the code using PLT and write BDA, will that BDA update to NVDS_TAG_BD_ADDRESS or OTP header?

感谢致敬

Rohit R.

PM_Dialog
Offline
Last seen:3 hours 2 min ago
Staff
加入:2018-02-08 11:03
Hi Rohit,

Hi Rohit,

In all cases, if you are using the PLT to burn the BDA, then it will be stored in the OTP Header. Then the DA1458x will start advertising with the BDA from the OTH Header. Please check nvds_read_bdaddr_from_otp(). Do you mean to burn the BDA in the OTP Hader and then read it from you FW?

Thanks, PM_Dialog

Rajapurerohit
Offline
Last seen:9 months 2 weeks ago
加入:2017-04-20 09:17
嗨PM_DIALOG.,

嗨PM_DIALOG.,

好的,谢谢你的反馈。

检查nvds_read_bdaddr_from_otp() -Okay, I will check the function.

Do you mean to burn the BDA in the OTP Hader and then read it from you FW? -Yes, I want to access the firmware and write same logic as I have done using the NVDS structure.

请通过步骤过程或任何示例,让我知道相同的例子。

感谢致敬

Rohit R.

PM_Dialog
Offline
Last seen:3 hours 2 min ago
Staff
加入:2018-02-08 11:03
Hi Rohit,

Hi Rohit,

如果设备BD地址在OTP标题中写入,则忽略CFG_NVDS_TAG_BD_ADDRESS值。如果检查system_init()函数,则会看到SDK检查并读取BD地址 - NVDS_READ_BDADDR()。如果检查上述功能,您将看到:

In case if DA14583, the SDK first checks and reads BD address from DA14583's internal SPI flash - nvds_read_bdaddr_from_da14583_flash().. If no BD address is found in flash, then tries to read BD address from OTP - nvds_read_bdaddr_from_otp().

In case of DA14580, as it does not contain an embedded SPI Flash, the SDK checks only the OTP Header - nvds_read_bdaddr_from_otp().

If you read the source code of nvds_read_bdaddr_from_otp(), you will see how to read the BD Address form the OTP Header which starts from 0x7fd4 address (BDADDR_OFFSET).

Thanks, PM_Dialog

Rajapurerohit
Offline
Last seen:9 months 2 weeks ago
加入:2017-04-20 09:17
嗨PM_DIALOG.,

嗨PM_DIALOG.,

Thank you so much for the response,

Okay, I have just gone through the source code of nvds_read_bdaddr_from_otp () and if I am not wrong, I just need to call this function wherever required in my custom code and map this "otp_bdaddr" structure instead of "NVDS" structure.

Correct me if I am wrong, and the procedure is the same for all DA1458x MCU's (whether it is DA14580 or DA14583) during production when we use PLT?

感谢致敬

Rohit R.

PM_Dialog
Offline
Last seen:3 hours 2 min ago
Staff
加入:2018-02-08 11:03
Hi Rohit,

Hi Rohit,

的otp_bdaddr is mem-copied in the dev_bdaddr.

memcpy(&dev_bdaddr, otp_bdaddr, sizeof(dev_bdaddr));

如果在SDK中搜索一点点,您将找到以下内容:

/// Device BD address

struct bd_addr dev_bdaddr __attribute__((section("retention_mem_area0"), zero_init));

SDK已检索OTP_BDADDR。因此,这取决于您 - 您可以使用此功能或实现基于NVDS_READ_BDADDR_FROM_OTP()的功能,您需要做的就是从OTP读取正确的地址。

Thanks, PM_Dialog

Rajapurerohit
Offline
Last seen:9 months 2 weeks ago
加入:2017-04-20 09:17
嗨PM_DIALOG.,

嗨PM_DIALOG.,

好的,非常感谢你的回应。

I will go through all the points and get back to you.

感谢致敬

Rohit R.

Rajapurerohit
Offline
Last seen:9 months 2 weeks ago
加入:2017-04-20 09:17
嗨PM_DIALOG.

嗨PM_DIALOG.

I have followed the below steps to build OTP firmware

1) in da1458x_config_advanced.h file defined - #define CFG_BOOT_FROM_OTP

2)在User_Peripheral文件中,extern struct bd_addr * dev_bdaddr;(///从nvds.c文件struct bd_addr dev_bdaddr __attribute __((部分(“retent_mem_area0”),zero_init)))))
3) in user_peripheral file - using dev_bdaddr->addr[5]; accessed address and assigned in advertising variable
4) built the code without error

通过上面的4个步骤,我试图从OTP访问BDA,但我不确定是否正确,我根据我的理解尝试了。
Can you please let me know is this correct or not? Because I do want to try this on custom board unless I am 100% correct.

And If there are any other steps or any other things that need to be enabled for the production point of view in firmware then let me know with respect to DA14580 and DA14583 MCU.

感谢致敬

Rohit R.

PM_Dialog
Offline
Last seen:3 hours 2 min ago
Staff
加入:2018-02-08 11:03
Hi Rohit,

Hi Rohit,

Sorry, bur I am little bit confused, so could you please indicate what you are trying to accomplish? Did you burn the OTP with your firmware, or did you burn the OTP Header with a specific BDA? Just try to connect to the OTP Header from the SmartSnippets Toolbox and burn your BDA.

Still I am not completely sure if I have understood your requirement. If I understood correctly you have 2 different products. The first one in based on DA14580 and the second on the DA14583.

You would like to use the PLT and burn the OTP Header with a specific BDA. For testing purposes, you can use the SST in order to burn the BD address. Did you burn the OTP Header?

Thanks, PM_Dialog

Rajapurerohit
Offline
Last seen:9 months 2 weeks ago
加入:2017-04-20 09:17
嗨PM_DIALOG.,

嗨PM_DIALOG.,

No, I have not tried anything yet. I have limited devices now so I have not burned firmware to any device. I am just preparing final firmware.

means, my question is are those steps for accessing BDA from OTP are correct or not? If steps are correct then, do I need to change in DA14583 firmware also or is it only for DA14580?

"Still, I am not completely sure if I have understood your requirement. If I understood correctly you have 2 different products. The first one is based on DA14580 and the second on the DA14583". -是的,我有2个具有不同MCU雷电竞官网登录的产品,一个是使用DA14580,另一个是DA14583。我将使用PLT进行大规模生产。所以我询问了我需要在固件中的生产中启用或禁用的所有内容?这意味着DA14580需要什么以及生产过程中DA14583所需的内容。

感谢致敬

Rohit R.

PM_Dialog
Offline
Last seen:3 hours 2 min ago
Staff
加入:2018-02-08 11:03
Hi Rohit,

Hi Rohit,

Apologies for the delay. Externign the dev_bdaddr could be a possible approach. The device obtains the bd address during start up, in the nvds_read_bdaddr() function (the device checks from the where the bd address can be obtained either NVDS structure or OTP) and places the obtained value in the dev_bdaddr variable that holds the address of the device.

Can you please clarify #3 step?

>>>in user_peripheral file - using dev_bdaddr->addr[5]; accessed address and assigned in advertising variable

Do you mean that you want to add the bd address in the advertising string?

As I have already mentioned, you should burn the BD Address in the OTP Header. Please use the Smart Snippets toolbox in order to read and burn the OTP Header. You will not need to burn the whole application image into OTP and boot from there

Thanks, PM_Dialog

Rajapurerohit
Offline
Last seen:9 months 2 weeks ago
加入:2017-04-20 09:17
嗨PM_DIALOG.,

嗨PM_DIALOG.,

好的,谢谢你的反馈。

">>>in user_peripheral file - using dev_bdaddr->addr[5]; accessed address and assigned in advertising variable

Do you mean that you want to add the bd address in the advertising string?" -yes, correct. I am using a bd address in the advertising string.

"As I have already mentioned, you should burn the BD Address in the OTP Header. Please use the Smart Snippets toolbox in order to read and burn the OTP Header. You will not need to burn the whole application image into OTP and boot from there" -Okay, means if I just burn OTP header and check the device advertisement then I will be able to read address rite? Could you please share the steps to do it will help me to understand so that I should not make any mistake because I have very less device with now and other are in production process so.

Thank and Regards

Rohit R.

Rajapurerohit
Offline
Last seen:9 months 2 weeks ago
加入:2017-04-20 09:17
嗨PM_DIALOG.,

嗨PM_DIALOG.,

Any update for me regarding the previous post?

感谢致敬

Rohit R.

PM_Dialog
Offline
Last seen:3 hours 2 min ago
Staff
加入:2018-02-08 11:03
Hi Rohit,

Hi Rohit,

Sorry, probably I missed your last comment. Do you mean the steps you should follow in order to burn the BDA in the OTP Header through the Smart Snippets Toolbox?

If yes, you could use the CLI in order to burn the BD Address in the OTP Header. The CLI can be found under \5.0.4\binaries\host\windows\prod_test_cmds SDK path. The following command will write the BD Address into OTP:

prodtest -p otp wr_bdaddr

example: prodtest –p 14 otp wr_bdaddr 44:49:41:4c:4f:47

Another option might be to use the SmartSnippets Toolbox in order to burn the BD address in the OTP Header. Generally, for burning the OTP through the SST you should the OTP Programmer. Keep in mind that the latest version of the tool is recommended .

The OTP has 3 areas where the user can burn data:

  • The OTP image area, where the user code is placed and mirrors to the sysram at boot.
  • The OTP NVDS area, where the NVDS structure is populated with the OTP at boot.
  • The OTP Header area, where flags and specific values that define the operation of the device are placed (more information regarding the values of the OTP Header can be found in the Smart Snippets User guide).

When burning the OTP, you should make sure that the programming voltage is clean and must not exceed 6.8V. Please refer to the datasheet to find more details for the programming voltage. Keep in mind that OTP stands for One Time Programmable, thus you can’t erase and re-write the OTP multiple times, but you can only flip the bits that are still set to 0 and turn them to 1.

在你的情况下,开放对海温和连接the OTP Header. As soon as you are connected, you will see the all the available field in the OTP Header. The PLT will store the BD Address in the following address in “Device unique ID” fields.

So, if you would like to test it, you should burn the BD address in the “Device unique ID” field. Please note that, the most significant (left-most) byte of a word is stored in the smallest address (big-endian). E.g. if a user types 0A0B0C0D for field ‘Device Unique ID’, 0x0A will be written at 0x47FD4 and 0x0D will be written at 0x47FD7.

Thanks, PM_Dialog