The current device is DA14585 running SDK 6.0.14.
I'm using a code in order to write some words to the otp header using the "hw_otpc_fifo_prog" function. I also tried the other functions to write to the otp header "hw_otpc_dma_prog" and "hw_otpc_manual_prog".
The code is working, meaning that it actually writes the desired words in the otp header. The problem is that when I put the device in any sleep mode after running this write command, as soon as it wakes up from this sleep state it issues a reset.
I'm trying to understand the reason for this reset and if this behaviour is expected after writing to the otp header.
The code to write to the otp header is structured in a way similar to the following:
hw_otpc_init(); hw_otpc_fifo_prog((const uint32_t *) (&word2write), target_address >> 3, HW_OTPC_WORD_LOW, 2, false); hw_otpc_disable();
Hi Omar,As you probably know OTP stands for One Time Programmable memory. You are not going to be able to write on the same address of the OTP twice. I guess that the Reset is being caused by the behavior (or delay) caused by trying to write on the same address of the OTP every time you wake up. Also, I would suggest you write the OTP Header via SmartSnippets Toolbox rather via Software on your firmware.In order to understand better this behavior, please attach the debuggger as JH_Renesas stated.Please refer here as well: 5. Debugging using Ozone — DA145XX Tutorial SDK Getting started (renesas.com)Best Regards,OV_Renesas
Hey,
First of all thank you for your reply. Furthermore, I wanted to better explain that this reset occurs as a result of writing to the OTP header for the first time. I would also like to add that the same reset occurs when I try a similar function to read the value that I wrote before to the OTP header. In conclusion, whenever I access the OTP, either to write or read I always get a reset after waking up from any sleep mode.
Hi Omar,Thank you for the reply.I have issued some questions on the private ticket that a colleague of yours has raised for the same issue.Were you able to attach the debugger while trying to access the OTP and check what triggers the Software Reset?Best Regards,OV_Renesas