14个帖子/ 0新
Last post
dhirajp15
Offline
Last seen:2 years 1 month ago
Joined:2016-06-08 15:26
Suota Scheme 2

Hi Dialog,
我正在使用方案1来使用Suota在DA14583上升级固件,如AN-B-010的说明和Training6 suota_example.i现在想要加密图像并将辅助引导加载程序存储在OTP中。所以,我只想询问我们是否可以为DA14583设备编程使用方案2。如果是的,我将在哪里找到在OTP中仅在OTP中编写次级引导程序的步骤,而我的固件图像将保持在闪存中?

Device:
MT_dialog
Offline
Last seen:2 months 1 week ago
Staff
Joined:2015-06-08 11:34
Hi dhirajp15,

Hi dhirajp15,

583已经刻录了OTP刻录,但有一个选项可以刻录高级引导加载程序,因此理论上您可以使用辅助引导加载程序作为拟议引导加载程序,并将583个OTP图像的其余部分与该引导加载程序(自583有不同的默认引脚。对于内部闪存,您需要将S. Bootloader配置为使用它们)。在这种情况下,OTP将加载583引导加载程序,并且当583引导加载程序在Sysram上运行时,它会检查OTP中是否存在高级引导程序(583引导程序的描述中描述了文档UM-B-012)并将从OTP加载MultiPart引导加载程序。因此,由于您已刻录二次引导加载程序,这是从583加载的内容。现在,由于583具有嵌入式闪存,因此未经测试或建议您所要求的方案,因为您可以将辅助引导加载程序带到您的Flash而不是OTP,因此没有文档或教程如何在583上执行此操作。

Thanks MT_dialog

dhirajp15
Offline
Last seen:2 years 1 month ago
Joined:2016-06-08 15:26
hi MT_Dialog,

hi MT_Dialog,
though 583 has embedded flash it can be read by an external device , so for protecting my firmware I aim for implementing new scheme. I am presently using SUOTA multipart binary scheme, wherein my advance bootloader and encrypted images are in flash which can be read by external device.So I want to ask If I can store encryption key in OTP and advance bootloader would read the encryption key from otp?
谢谢,
dhiraj

MT_dialog
Offline
Last seen:2 months 1 week ago
Staff
Joined:2015-06-08 11:34
嗨dhirajp,

嗨dhirajp,

Well i dont see anything wrong in doing that, although we haven't tested a scheme like this, your scenario seems plausible.

Thanks MT_dialog

dhirajp15
Offline
Last seen:2 years 1 month ago
Joined:2016-06-08 15:26
嗨mt_dialog,

嗨mt_dialog,
是否有一种初始化,读取和写入OTP内存的方法?我可以从SmartSnippetS OTP程序员那里闪光,但是什么样的阅读键或内容?
Thanks Dhiraj

MT_dialog
Offline
Last seen:2 months 1 week ago
Staff
Joined:2015-06-08 11:34
嗨dhirajp,

嗨dhirajp,

When the 580 starts up it checks the OTP for an available bd address, i suppose that you can modify this function with a different address in order to read other fields of the OTP as well. You will be able to find the function in the SDK in the nvds_read_bdaddr_from_otp() and read the corresponding address.

Thanks MT_dialog

dhirajp15
Offline
Last seen:2 years 1 month ago
Joined:2016-06-08 15:26
嗨mt_dialog,

嗨mt_dialog,
谢谢您的帮助!
我们正在使用583数据点服务设备, we want to store some private information which will never change in future and should not be rewrittable , so we plan to store it in otp, I am able to read data from otp as you suggested , but to write to otp there are three ways in otp programmer, 1.otp header,2.otp nvds, 3.otp image , i have 32bytes of data to be written in otp , which way should I use?
谢谢Dhiraj.

MT_dialog
Offline
Last seen:2 months 1 week ago
Staff
Joined:2015-06-08 11:34
Hi dhirajp15,

Hi dhirajp15,

The OTP image placeholder is just for the image that is going to be uploaded into the 580 and the OTP NVDS is just a reserved place in the image it self that is used for the predefined reasons, bluetooth address, etc. You can either place the data that you would like in the code itself or you could use the custom fields in the OTP header. The customer specific fields of the OTP span from the address 0x7F10 to 0x7F60.

Thanks MT_dialog

dhirajp15
Offline
Last seen:2 years 1 month ago
Joined:2016-06-08 15:26
Hi MT_dialog,

Hi MT_dialog,
I made the changes in custom fields in default otp header also set the address field of advance bootloader for future use and burnt it , now I if I write a code to read the data from otp and run it in debug mode , it works! But If I flash the image in SPI Flash it does'nt work.Is it because I have burnt the otp header so now onward it will boot only from otp? do I need to place advance bootloader in otp ? Current my advance bootloader is in SPI flash and I am using multipart binary with suota enabled.
PFA the otp_header.hex
我的目标是在Flash中保持前进的Bootloader,以便将来可以更改,我也希望在OTP内存中保留一些永久私有数据。
谢谢Dhiraj.

Attachment:
MT_dialog
Offline
Last seen:2 months 1 week ago
Staff
Joined:2015-06-08 11:34
Hi dhirajp15,

Hi dhirajp15,

I assume that "it doens't work from flash" means that you are not able to boot from flash ? I dont think that the fact that you can't boot from flash has to do with the fact that you ve burned the OTP. On the 583 the OTP is allready burned with the 583 bootloader and the application flags as well so that the 583 to be able to boot from its internal flash. Is the advanced bootloader running when the system boots ?

Thanks MT_dialog

dhirajp15
Offline
Last seen:2 years 1 month ago
Joined:2016-06-08 15:26
嗨mt_dialog,

嗨mt_dialog,
Yes I am not able to boot from flash, and how to detect if advance bootloader is running? Also I have attached the otp header file in previous comment, there i had set the address for advance bootloader as 0x2000,so that I could flash the advance bootloader if required in future, but now it is not allowing me to burn the bootloader in otp and if i keep advance bootloader in flash , the device doesnt boot.
谢谢,
dhiraj

MT_dialog
Offline
Last seen:2 months 1 week ago
Staff
Joined:2015-06-08 11:34
Hi dhirajp15,

Hi dhirajp15,

Since you are not booting the advanced bootloader from the OTP but from flash you should not specify in the OTP that there is an advanced bootloader in the OTP. You should let the 583 bootloader to run and boot from the flash (perform the scanning procedure and boot normally from flash the secondary bootloader). From there it will load the secondary bootloader and then your image will be loaded. Please check the UM-B-012 Creation of a secondary boot loader 3.0.pdf at section 5.1. With the configuration you have on the OTP header, the 583 bootloader sees that the 0x7F10 address has a value and tries to copy what is written at that address from the OTP and offcourse the OTP at that point is blank since you have not burned the bootloader.

Thanks MT_dialog

dhirajp15
Offline
Last seen:2 years 1 month ago
Joined:2016-06-08 15:26
嗨mt_dialog,

嗨mt_dialog,
我再次闪烁了OTP标题,将前进引导加载程序地址保存为默认值并运行。
谢谢您的帮助。
问候,
dhiraj

MT_dialog
Offline
Last seen:2 months 1 week ago
Staff
Joined:2015-06-08 11:34
Hi dhirajp15,

Hi dhirajp15,

Glad you could make it work, If any of the above posts have helped, please mark them as accepted.

Thanks MT_dialog