Greetings,
I managed to implement the SUOTA feature on our product. Everything works fine. I'm able the generate different versions of the software and update the nodes from a smartphone.
What is annoying me is that I need to generate a separate image file for each node I want to update, because they have different addresses (set in the nvds file). This is not really a problem now, but may become one as we begin sending the product out to customers. You see, I would prefer not to send out 100 images to a customer having 100 nodes. The only way I see I can get around that is to write the address in the OTP, so it is not affected by the update.
Can you confirm that this would be the way to proceed?
If so, do you have any documentation on how to put a portion of the program in the OTP (in my case, the address), but still rely on the SPI Flash to hold the rest ?
If not, should I prefer SPOTA to SUOTA ?
Any details would be appreciated.
Thanks,
Martin
Are you talking about the MAC-addresses? If so, then yes this is the way to go.
You can simply write your MAC-addresses to the OTP header at the designated OTP address 0x(4)7fd4, different for each device.
The SDK first checks if there is an address written in OTP (if the 6 bytes are not all zeros), and if so, that one is taken. If not, the one specified in the nvds struct is taken instead.
If you have this defined in your da14580_config.h, which I suggest:
#define APP_BOOT_FROM_OTP
then the address will be read from RAM instead which contains the mirrored OTP header, which is more efficient since the OTP header has already been copied to RAM at boot time, so there is no need to read the OTP another time. This requires that your firmware image is at most 32512 bytes (otherwise the mirrored OTP header will be overwritten), which it should be anyway...
Thanks ! I'll look into it.
Hi mboudreault,
Thank you Joacimwe for the indications, as you suggested burning the OTP is the write way of devices having seperate bdaddress. Please have a look at the document AN-B-020 for further instructions.
Thanks MT_dialog