Hi!
There are many questions regarding the high voltage mode of the nRF5340 already in this Q&A, but I don't see the answer to the question, how it is enabled programmatically.
This is working to set the voltage to 3.3V:
nrfjprog -f nrf53 --memwr 0x00FF8010 --val 5
But if I try to set the register in code like the following statement, the program halts at that point with no exception, error or restart of the processor.
NRF_UICR->VREGHVOUT = 0x5;
I even tried to set the register to 0xFFFFFFFD and it worked for the command line with nrfjprog but not programmatically.
Is there anything that I have to do before I'm allowed to write to this register?
Thank you very much