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,
Thank you for posting your questions online.
I will look into this and will back to you soon.
BR,
JH_Renesas
Hi Omar
Are you using the EVK or customer board?
Could you attach a debugger to instance the reset reason? and share the result with us.
Hey,
I'll share with you the reset reason once I perform the test. In the meantime, I want to add that I tested the same code on the DA14585 and the DA14586 and the reset issue is only seen on the DA14585. I wanted to share this piece of information with you so that you can maybe tell me what could be the difference between the two devices while performing an OTP write.
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
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