lock the code in OTP so that no one can read it back

⚠️
Hi there.. thanks for coming to the forums. 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 https://www.dialog-semiconductor.com/support . We’ll be fixing bugs / optimising the searching and tagging over the coming days.
7 posts / 0 new
Last post
deshpandead
Offline
Last seen: 2 years 6 months ago
Joined: 2018-03-17 12:29
lock the code in OTP so that no one can read it back

HI,

When load my Code image into OTP Memory using the SmartSnippets Tool Box,Can I lock the code in OTP so that no one can read it back?.

Thanks & Regards,

Abhijeet

 

Device: 
PM_Dialog
Offline
Last seen: 6 months 3 weeks ago
Staff
Joined: 2018-02-08 11:03
Hi deshpandead,

Hi deshpandead,

Thanks for your question online. Yes, you can make the FW inaccessible when is written in the OTP. This should be done by configuring the Configuration Script (CS). Please read section 4.4.2 from the DA14531 datasheet. See Table 35: CS Commands and Description and you will find the “SWD mode” command which disables the JTAG. However, let me check internally how you should do it through SmartSnippets Toolbox and I will get back to you as soon as possible with the proper steps.

Thanks, PM_Dialog

deshpandead
Offline
Last seen: 2 years 6 months ago
Joined: 2018-03-17 12:29
Thanks for the reply.Please

Thanks for the reply.Please check it internally for use of SmartSnippets ToolBox  for this case and let me know about the detailed procedure or dcoumentation regarding the same.

PM_Dialog
Offline
Last seen: 6 months 3 weeks ago
Staff
Joined: 2018-02-08 11:03
Hi deshpandead,

Hi deshpandead,

Sure, I will keep you updated and get back to you ASAP.

Thanks, PM_Dialog

PM_Dialog
Offline
Last seen: 6 months 3 weeks ago
Staff
Joined: 2018-02-08 11:03
Hi deshpandead,

Hi deshpandead,

As mentioned in my previous reply, you can make the FW inaccessible when is written in the OTP by configuring the Configuration Script (CS), which is placed in the OTP header. Please follow the steps below. It is recommended to use the latest version (v2.0.10) of SmartSnippets Toolbox (SST). You will find it in the DA14531 product page.

  1. Open SmartSnippets Toolbox (through JTAG or through UART) and navigate to the OTP Header.
  2. Connect to the OTP Header. In case of UART, RESET is required.
  3. As soon as you have connected, select the Configuration Script and hover into the “value” column.  Please see step_3.png in the attachments.
  4. Click into the ‘’Edit” button which will be appeared (it is in red outline).
  5. After that, you should see the Configuration Script with the default values.
  6. Scroll down and find the last command entry. Probably it the entry number 10
  7. Change the “Add command type” field to “Development Mode disable” and make sure for the “after command with number” filed has the correct value. Please see step_7.png which is attached.
  8. Press “Add” and then “OK”
  9. After that, you will get a pop-up window like in step_9.png. Press “Yes”.
  10. A new command should be entered in the Configuration Script. One 32-bit word which is equal to 0x70000000 should be written. See step_10.png
  11. In the firmware side, you should not enable the JTAG. Also, you will need undefine the CFG_DEVELOPMENT_DEBUG macro.

After the steps below, try to download FW though Keil. You should not be able to download it as the JTAG is now disable. Keep in mind that OTP stands for One Time Programmable, thus you can’t erase and re-write the OTP multiple times.

Thanks, PM_Dialog

Attachment: 
deshpandead
Offline
Last seen: 2 years 6 months ago
Joined: 2018-03-17 12:29
Thanks!.Let me try it out and

Thanks!.Let me try it out and then I will get back to you.

PM_Dialog
Offline
Last seen: 6 months 3 weeks ago
Staff
Joined: 2018-02-08 11:03
Hi deshpandead,

Hi deshpandead,

OK, please try it and let me know. I’m waiting your feedback. I would like to point again that OTP stands for One Time Programmable, thus you can’t erase and re-write the OTP multiple times.

Thanks, PM_Dialog