dual image boot loader burn into OTP

3 posts / 0 new
Last post
uta_lc
Offline
Last seen:1 year 1 month ago
加入:2016-05-03 07:39
dual image boot loader burn into OTP

Dear Dialogue support,

我想烧双image boot loader compiled locally into OTP, but so far I have no luck making it work. (SDK 5.0.3) I'm using the DA1458x_SUOTA_Multipart_Binary_Generator provided by DA.

I've generated a fw_multi_part_spi.bin file using the dual image loader (secondary_bootloader.bin) and my app. After burning the dual image loader and two copies of the app into external flash, I can see advertising is working and I can do SUOTA as expected. (BOOT_2ND_LOADER_IN_OTP = false, using the default image format i.e., 0x0, 0x8000, 0x13000 are the start of each image).

I then tried to burn the same secondary_bootloader.bin into OTP, copied the OTP header from Dialogue smart tag and burnt it onto the chip. Reading back from OTP using smartsnippets shows the burning process works. Regenerated the fw_multi_part_spi.bin file using BOOT_2ND_LOADER_IN_OTP = True, and burned the flash. But after that, the chip stops advertising.

Questions:
1. I don't need to change anything to generate the secondary_bootloader.bin to be burned into OTP as it works in external flash. Am I correct?
2. The OTP header read from Dialogue smart tag should be directly usable with a little bit of tweaking of MAC address, DMA length? I understand that some trim values should be different from board to board but it should work across many boards even without any change - just for proving OTP burning works?
3. Is there anything else that I'm not aware of which may attribute to the failure?
4. I can see the secondary_bootloader.bin I compiled is smaller than the one read from Dialogue smart tag. Is this only because of version difference? I was trying to copy the boot loader of the Dialogue smart tag but looks like there is no way to save the OTP image read from the Dialogue smart tag.

Best regards,
uta_lc

Device:
MT_dialog
Offline
Last seen:3 months 2 days ago
工作人员
加入:2015-06-08 11:34
Hi uta_lc,

Hi uta_lc,

The procedure is described in the SUOTA documentation AN-B-010 in case you missed it, can you please try to create the multipart by following this tutorial, i ve checked the python script with a secondary bootloader in OTP and seems to be working fine, but in any case please give it a try.

1) No you dont need to change the secondary bootloader when you burn it in the OTP, the same image that is burned in the Flash is the same with the one burned in the OTP.

2) The trimming values should be left as is on the 580 that is going to be burned, the MAC address is something that can change, for just a test , by burning the Application Flags will enable the OTP and your setup should work, even if you leave the DMA length at zero, it will copy the entire OTP.

3) Are the application flags in the OTP set to Yes in order for the 580 to be aware that there is data in the OTP and to start booting the secondary bootloader ? Also in the OTP header there is an option for the user to select the low power clock from the OTP (this option has to be configured from the SDK as well - instruct the SDK to select the LP clock accoring to the option selected from the OTP), so what you should also check is that in case that you dont have an XTAL32 and the OTP configures your fw to have the XTAL (if i remember correcty the Smart Tag configures the LP clock in XTAL).

4) Since the whole system is booting from the SPI with no problem i dont think that the size of the Secondary Bootloader is a problem, the Smart Tag is based on a quite old SDK.

Thanks MT_dialog

uta_lc
Offline
Last seen:1 year 1 month ago
加入:2016-05-03 07:39
Thanks, sorted it out. Based

Thanks, sorted it out. Based on your suggestion, it works after making the application flag "YES" and leaving everything else untouched.