Hello,
Perhaps the problem concerns using debugger in order to write the register.
"To R/W the LPGPR registers through the debugger, the GPR_Z_DIS bit needs to be set in the LPCR register.
When the debugger is used, the SNVS issues a security violation and zeroizes the GPR registers. The GPR_Z_DIS
bit needs to be set to keep the LPGPR registers from being zeroed.
The LPGPR registers are privileged access R/W. If needed, non-privileged software can access the LPGPR registers
by setting the NPSWA_EN bit in HPCOMR. The HPCOMR is accessible by privileged software.
For more details on the SNVS, customers may refer to the RM and the SRM Security Reference Manual for the i.MX RT1050 Processor (requires licensing agreement)."
https://www.nxp.com/docs/en/reference-manual/IMXRT1050RM.pdf
Have a great day,
Yuri
------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!