Programming OTP without SmartSnippets

⚠️
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//www.wsdof.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
7 posts / 0 new
Last post
steven.mcgrath
Offline
Last seen:1 year 12 months ago
加入:2019-02-19 15:58
Programming OTP without SmartSnippets

Hi everyone,

This might be a basic question, but is there any way to access and program the OTP region without using the SmartSnippets tools. I have tried accessing and modifying the OPTC_MODE_REG as well as the SYS_CTRL_REG with no success. I am using my own custom setup to connect to the chip using T_TMS (SWDIO) and T_TCK (SWCLK) and am able to modify the data located in SRAM. Is there a specific setting in one of the registers that will allow me to access OPTC_MODE_REG and SYS_CTRL_REG? A register unlock of some sort.

Thank you.

Device:
PM_Dialog
Offline
Last seen:3 hours 15 min ago
工作人员
加入:2018-02-08 11:03
嗨steven.mcgrath,

嗨steven.mcgrath,

I would strongly recommend you the usage of SmartSnippets toolbox in order to burn the OTP because we don not support custom setups. However, you can refer to the flash programmer project which is under 5.0.4\utilities\flash_programmer SDK path. Please check otpc.h / .h files.

Thanks, PM_Dialog

steven.mcgrath
Offline
Last seen:1 year 12 months ago
加入:2019-02-19 15:58
Hello,

Hello,

Thank you for the quick response. I have been referencing the flash programmer project that you are mentioning and specifically, when I am calling the optc_clock_enable function, I seem to lose access to the OTP region (at least OTP memory can no longer be viewed). When calling the optc_write_fifo function, the OTPC_STAT_PERR_U, OTPC_STAT_PERR_L and the OTPC_STAT_PERROR flags are present and it results in a failed action.

I can see that the data I want to be programmed is present in the OTPC_FFPRT_REG, but how do I transfer this to the OTP region? Maybe I am missing some vital information but I seem to be following along with the SDK exactly as instructed. Any help would be greatly appreciated. Thanks.

PM_Dialog
Offline
Last seen:3 hours 15 min ago
工作人员
加入:2018-02-08 11:03
嗨steven.mcgrath,

嗨steven.mcgrath,

Please have a look at the programmer.c file which is under “Source file” project folder and search for the ACTION_OTP_WRITE definition. This might help you! You could also check the ACTION_OTP_READ.

Thanks, PM_Dialog

steven.mcgrath
Offline
Last seen:1 year 12 months ago
加入:2019-02-19 15:58
Hello,

Hello,

The programmer.c file is the source code I have been referencing and using when running into these issues. As I said before, when I call the optc_clock_enable function, the OTP (0x47000-0x47FFF) memory is no longer viewable. I can program the OTPC_FFRT_REG(0x40008018) with the correct data but how does this transfer to the OTP region? Also once the optc_clock_disable function is called, the data in the OTPC_FFRT_REG is no longer present. I am esentially using all of the source code from programmer.c it just seems that the information is programmed into the FIFO region and does not go anywhere from there. Is there an extra step to access the OTP region and transfer this data?

任何help is greatly appreciated. Thank you for taking the time to respond.

steven.mcgrath
Offline
Last seen:1 year 12 months ago
加入:2019-02-19 15:58
Hello,

Hello,

A quick comment on this matter. I have been looking through the documentation for the DA14580 device and notice the OTPC_PCTRL_REG where you can enable the upper and lower bank of the OTP for programming. In the SDK that you have referred me to and that I have been doing most of my work based off of, there is no reference to this register at all but it seems pretty important in order to program the OTP memory. Could you provide any insight if this register is necessary to program the OTP region and what other enables might be necessary since the SDK seems to leave out this information.

此外,SDK的OTP_READ函数正在运行,我能够在包括OTP标题信息的OTP中查看数据。

Thank you for the support. I look forward to hearing back.

Steve

PM_Dialog
Offline
Last seen:3 hours 15 min ago
工作人员
加入:2018-02-08 11:03
Hi Steven,

Hi Steven,

My apologies for the delay. I had mentioned, we use the SmartSnippets studio for programming the OTP. Regarding the flash_programmer project, please check the otpc_write_fifo() . When you try to burn the OTP, you have to make sure that the programming voltage is clean and must not exceed 6.8V. Also the 6.8V can only be applied to VPP after the VBAT3V is supplied and must be removed from VPP before the VBAT3V is removed, otherwise the chip could be damaged.

Thanks, PM_Dialog