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进行操作。因此,批量生产时间在DA14580和DA14583方面都需要考虑BDA。
Thanks and Regards
罗希特R
设备:
嗨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
您是否使用此工具进行生产?
Thanks, 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?
Thanks and Regards
罗希特R
嗨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
嗨pm_dialog,
感谢您的反馈,
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方法以及闪存的编程设备的影响是什么?
Thanks and Regards
罗希特R
嗨rohit,
当使用PLT时,BD地址将被编程到OTP标题中。之后,设备将获取OTP报头的BD地址,因此将忽略NVDS中的任何其他BD地址或应用程序代码中的任何其他BD地址。在生产过程中,代码不会受到影响,但如前所述,在PLT将与适当的BD地址写入OTP标题之前。关于你的最后一个问题,请你澄清一下吗?请注意,OTP代表一次性可编程,因此不能多次写入。
Thanks, 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
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
而对于一些产品,我正在使用DA14583,所以我将使用闪光灯。所以请让我知道使用闪光灯的BDA效果是什么。
“在生产过程中,代码不会受到影响,
but as mentioned before the PLT will write the OTP header with the appropriate BD address"
-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.
Thanks and Regards
罗希特R
嗨rohit,
如果您计划使用PLT生产,并且如果要通过PLT刻录BD地址,则BD地址将存储在OTP标题的相应字段中。这个领域也可以在没有PLT的情况下烧毁,所以如果您有大量的电路板,您可以进行一些测试。您可以使用“使用SmartSnippet”工具箱来读取和编写OTP标题。
>>>如果我使用Flash进行生产,那么效果是多少?
如果将BD地址编程到OTP标题?因此,如果我正确地理解您的设计中使用DA14580和DA14583,您是否想通过PLT进行编程(使用不同的FW假设)?那个BD地址怎么样?
Thanks, PM_Dialog
嗨pm_dialog,
感谢您的反馈,
>>>如果我使用Flash进行生产,那么效果是多少?-means, for some product I am using DA14583 MCU and there I have flash option so using PLT and write BDA through it, then will BDA write to OTP header only or it will write in NVDS structure (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_TAG_BD_ADDRESS或OTP标题?
Thanks and Regards
罗希特R
嗨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
嗨pm_dialog,
Okay, thank you for the feedback.
check nvds_read_bdaddr_from_otp() -好的,我会检查这个功能。
Do you mean to burn the BDA in the OTP Hader and then read it from you FW? -是的,我想访问固件并在使用NVDS结构完成时写入相同的逻辑。
Please let me know the step by step procedure or any example to do the same.
Thanks and Regards
罗希特R
嗨rohit,
如果device BD Address is written in OTP header the CFG_NVDS_TAG_BD_ADDRESS value is ignored. If you check the system_init() function, then you will see the SDK checks and reads the BD address - nvds_read_bdaddr(). If you check the aforementioned function, you will see that :
如果da14583,sdk首次检查并读取来自da14583的内部spi flash - nvds_read_bdaddr_from_da14583_flash()的BD地址..如果在Flash中没有找到BD地址,则尝试从OTP - NVDS_READ_BDADDR_FROM_OTP()读取BD地址。
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_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.
如果我错了,请纠正我,并且在我们使用PLT时,所有DA1458X MCU(无论是DA14580还是DA14583)的过程相同吗?
Thanks and Regards
罗希特R
嗨rohit,
The otp_bdaddr is mem-copied in the dev_bdaddr.
memcpy(&dev_bdaddr, otp_bdaddr, sizeof(dev_bdaddr));
If you search a little bit in the SDK, you will find the following:
///设备BD地址
struct bd_addr dev_bdaddr __attribute __((部分(“retent_mem_area0”),zero_init));
The otp_bdaddr is already retrieved by the SDK. So, this is up to you – you can use this function or implement you own function based on nvds_read_bdaddr_from_otp(), All you need to do is to read the correct address from the OTP.
Thanks, PM_Dialog
嗨pm_dialog,
Okay, thank you so much for the response.
我会经历所有的积分并回复你。
Thanks and Regards
罗希特R
嗨PM_Dialog
我遵循以下步骤来构建OTP固件
1) in da1458x_config_advanced.h file defined - #define CFG_BOOT_FROM_OTP
2) in user_peripheral file externed - extern struct bd_addr *dev_bdaddr; (/// Device BD address from nvds.c file struct bd_addr dev_bdaddr __attribute__((section("retention_mem_area0"), zero_init)))
3)在user_beripheral文件中 - 使用dev_bdaddr-> addr [5];访问的地址并分配在广告变量中
4) built the code without error
With the above 4 steps, I tried to access the BDA from OTP But I am not sure whether is it correct or not, I have tried as per my understanding.
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.
Thanks and Regards
罗希特R
嗨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
嗨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". -yes, I have 2 products with different MCU, one is using DA14580 and another one is DA14583. And I am going to use PLT for mass production. So I have asked what all things I need to enable or disable with respect to production in firmware? This means what is necessary for DA14580 and what is necessary for DA14583 during production.
Thanks and Regards
罗希特R
嗨rohit,
延迟道歉。广泛的rnign 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?
>>>在User_Peripheral文件中 - 使用dev_bdaddr-> addr [5];访问的地址并分配在广告变量中
你的意思是你想在广告字符串中添加BD地址吗?
正如我已经提到的那样,您应该在OTP标题中刻录BD地址。请使用智能代码段工具箱才能读取和刻录OTP标头。您不需要将整个应用程序图像刻录到OTP并从那里启动
Thanks, PM_Dialog
嗨pm_dialog,
Okay, Thank you for the feedback.
“>>>在User_Peripheral文件中 - 使用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.
谢谢和问候
罗希特R
嗨pm_dialog,
Any update for me regarding the previous post?
Thanks and Regards
罗希特R
嗨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?
如果是,则可以使用CLI才能刻录OTP标题中的BD地址。CLI可以在\ 5.0.4 \二进制\主机\ Windows \ prod_test_cmds SDK路径下找到。以下命令将BD地址写入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:
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.
因此,如果您想测试它,您应该在“设备唯一ID”字段中刻录BD地址。请注意,单词中最重要的(最左)字节存储在最小的地址(Big-Endian)中。例如。如果字段'设备唯一ID'的用户类型0a0b0c0d,0x0a将写在0x47fd4,0x0d将写入0x47fd7。
Thanks, PM_Dialog