⚠️
大家好. .谢谢光临论坛。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.

Thanks and Regards

Rohit R

Device:
PM_Dialog
Offline
Last seen:2 hours 56 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
Hi PM_Dialog,

Hi 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

Rohit R

PM_Dialog
Offline
Last seen:2 hours 56 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
Hi PM_Dialog,

Hi 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?

Thanks and Regards

Rohit R

PM_Dialog
Offline
Last seen:2 hours 56 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
Hi PM_Dialog,

Hi 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,
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

Rohit R

PM_Dialog
Offline
Last seen:2 hours 56 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
Hi PM_Dialog,

Hi PM_Dialog,

Thank you for the feedback,

>>>And What is the effect If I am using Flash for production? -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.

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?

Thanks and Regards

Rohit R

PM_Dialog
Offline
Last seen:2 hours 56 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
Hi PM_Dialog,

Hi PM_Dialog,

Okay, thank you for the feedback.

check 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.

Please let me know the step by step procedure or any example to do the same.

Thanks and Regards

Rohit R

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

Hi Rohit,

If the 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 :

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
Hi PM_Dialog,

Hi 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?

Thanks and Regards

Rohit R

PM_Dialog
Offline
Last seen:2 hours 56 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));

If you search a little bit in the SDK, you will find the following:

/// Device BD address

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

的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

Rajapurerohit
Offline
Last seen:9 months 2 weeks ago
加入:2017-04-20 09:17
Hi PM_Dialog,

Hi PM_Dialog,

Okay, thank you so much for the response.

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

Thanks and Regards

Rohit R

Rajapurerohit
Offline
Last seen:9 months 2 weeks ago
加入:2017-04-20 09:17
Hi PM_Dialog

Hi 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) 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) in user_peripheral file - using dev_bdaddr->addr[5]; accessed address and assigned in advertising variable
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

Rohit R

PM_Dialog
Offline
Last seen:2 hours 56 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
Hi PM_Dialog,

Hi 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个产品不同的单片雷电竞官网登录机,一个是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

Rohit R

PM_Dialog
Offline
Last seen:2 hours 56 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
Hi PM_Dialog,

Hi PM_Dialog,

Okay, Thank you for the feedback.

">>>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
Hi PM_Dialog,

Hi PM_Dialog,

Any update for me regarding the previous post?

Thanks and Regards

Rohit R

PM_Dialog
Offline
Last seen:2 hours 56 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