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.
意思是,例如param_data[23]==nvds_data_ptr->nvds_TAG_BD_ADDRESS[2],这里,我使用了BDA的一个字节进行操作。因此,在大规模生产的时间都需要考虑什么关于BDA的DA14580和DA14583。
感谢致敬
Rohit R.
设备:
嗨,罗希特,
For mass production, please check the Production Line Tool (PLT). Up to 16 devices can be connected..
//www.wsdof.com/products/production-line-tool
你用这个工具生产吗?
Thanks, PM_Dialog
嗨,PM\U对话,
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.
嗨,罗希特,
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
嗨,PM\U对话,
谢谢你的反馈,
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.
我还想知道使用OTP方法和flash编程设备的效果如何?
感谢致敬
Rohit R.
嗨,罗希特,
当使用PLT时,BD地址将被编程到OTP报头中。之后,设备将获得OTP报头的BD地址,因此NVDS或应用程序代码中的任何其他BD地址都将被忽略。在生产过程中,代码不会受到影响,但是正如前面提到的,PLT将用适当的BD地址写入OTP头。关于你的最后一个问题,请你澄清一下好吗?请注意,OTP代表一次性可编程,因此不能多次写入。
Thanks, PM_Dialog
嗨,PM\U对话,
"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" -So, If I am using OTP for production then NVDS structure for BDA will be ignored
如果我想使用BDA,因为它需要我的操作,那么我必须映射OTP-BDA到我的逻辑正确吗?
If yes, then could you please share how to map OTP BDA? means if there is an example where someone used this method.
如果我使用Flash进行生产,效果如何?请向我解释你是如何澄清关于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.
“在生产过程中,代码不会受到影响,
但如前所述,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.
嗨,罗希特,
如果您计划使用PLT进行生产,并且如果您想通过PLT烧录BD地址,BD地址将存储在OTP报头的适当字段中。如果没有PLT,这个字段也会被烧毁,所以如果你有足够的板,你可以做一些测试。您可以使用SmartSnippets工具箱来读取和写入OTP头。
>>>如果我使用Flash进行生产,效果如何?
如果BD地址被编程到OTP报头?所以,如果我理解正确的话,您在设计中使用的是DA14580和DA14583,您想通过PLT(假设具有不同的fw)对两者进行编程吗?那BD地址呢?
Thanks, PM_Dialog
嗨,PM\U对话,
谢谢你的反馈,
>>>如果我使用Flash进行生产,效果如何-意味着,对于某些产品,我使用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.
所以当我使用PLT时,对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? -是的,我同时使用DA14580和DA14583,因为很少有产品是为DA14580设计的,也很少有产品是为DA14583 MCU设计的。是的,不同的固件。
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])
而且,如果我使用DA14583并使用PLT烧录代码并编写BDA,那么BDA会更新到NVDS\u TAG\u BD\u ADDRESS或OTP头吗?
感谢致敬
Rohit R.
嗨,罗希特,
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
嗨,PM\U对话,
好的,谢谢你的反馈。
检查nvds_read_bdaddr_from_otp() -好的,我检查一下功能。
Do you mean to burn the BDA in the OTP Hader and then read it from you FW? -是的,我想访问固件并编写与使用NVDS结构相同的逻辑。
请通过步骤过程或任何示例,让我知道相同的例子。
感谢致敬
Rohit R.
嗨,罗希特,
如果设备BD地址在OTP标题中写入,则忽略CFG_NVDS_TAG_BD_ADDRESS值。如果检查system_init()函数,则会看到SDK检查并读取BD地址 - NVDS_READ_BDADDR()。如果检查上述功能,您将看到:
如果是DA14583,SDK首先检查并从DA14583的内部SPI flash读取BD地址-nvds\u read\u bdaddr\u from\u DA14583\u flash()。。如果在flash中找不到BD地址,则尝试从OTP读取BD地址-nvds\u read \u bdaddr\u from \u 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
嗨,PM\U对话,
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.
如果我错了,请纠正我,当我们使用PLT时,生产过程中所有DA1458x MCU(无论是DA14580还是DA14583)的程序都是相同的?
感谢致敬
Rohit R.
嗨,罗希特,
The otp_bdaddr is mem-copied in the dev_bdaddr.
memcpy(&dev_bdaddr, otp_bdaddr, sizeof(dev_bdaddr));
如果在SDK中搜索一点点,您将找到以下内容:
///设备BD地址
struct bd_addr dev_bdaddr_uuuattribute_uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu((节(“保留\内存\区域0”),零\初始化));
SDK已检索OTP_BDADDR。因此,这取决于您 - 您可以使用此功能或实现基于NVDS_READ_BDADDR_FROM_OTP()的功能,您需要做的就是从OTP读取正确的地址。
Thanks, PM_Dialog
嗨,PM\U对话,
好的,非常感谢你的回应。
我会把所有的要点都讲完再给你回复。
感谢致敬
Rohit R.
嗨PM_DIALOG.
我已经按照以下步骤来构建OTP固件
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) 在user_peripheral file中-使用dev_bdaddr->addr[5];访问地址并在广告变量中分配
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.
嗨,罗希特,
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
嗨,PM\U对话,
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.
嗨,罗希特,
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
您的意思是要在广告字符串中添加bd地址吗?
正如我已经提到的,您应该烧录OTP头中的BD地址。请使用Smart Snippets工具箱读取并烧录OTP头。您不需要将整个应用程序映像烧录到OTP中并从那里引导
Thanks, PM_Dialog
嗨,PM\U对话,
好的,谢谢你的反馈。
“>>>在user_peripheral file中-使用dev_bdaddr->addr[5];访问地址并在广告变量中分配
您的意思是要在广告字符串中添加bd地址吗?”-是的,没错。我正在广告字符串中使用bd地址。
"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.
谢谢和问候
Rohit R.
嗨,PM\U对话,
Any update for me regarding the previous post?
感谢致敬
Rohit R.
嗨,罗希特,
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?
如果是,您可以使用CLI在OTP报头中烧录BD地址。CLI位于\5.0.4\binaries\host\windows\prod\u test\u cmds SDK path下。以下命令将BD地址写入OTP:
prodtest-potp wr\u 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 .
OTP有3个用户可以刻录数据的区域:
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.
因此,如果您想测试它,您应该在“deviceunique ID”字段中烧录BD地址。请注意,字的最高有效(最左边)字节存储在最小地址(大端)中。例如,如果用户为字段“Device Unique ID”键入0A0B0C0D,0x0A将写入0x47FD4,0x0D将写入0x47FD7。
Thanks, PM_Dialog