We now need to configure the registers of NRF5340 to 3.3V. Can this be directly configured in the device tree?



We now need to configure the registers of NRF5340 to 3.3V. Can this be directly configured in the device tree?



Hi,
No this needs to be done by writing to the UICR, it is not done with dts. Have a look here for instance.
Regards,
Elfving
Hi
I understand that nrfjprog has been officially deprecated. I'm using the peripheral_uart example. Where should I set "nrfjprog -f nrf53 --memwr 0x00FF8010 --val 5"? Additionally, can the code provided by Edvin for enabling (this functionality) be placed directly in the main function of the application core?
Regards,
kevin
HHJ said:I understand that nrfjprog has been officially deprecated.
Ah yes, that is true. Though it should still work, using nrfutil is preferable. For more on how to use nrfutil for this see here.
HHJ said:Additionally, can the code provided by Edvin for enabling (this functionality) be placed directly in the main function of the application core?
Yeah I believed so, though now I am also seeing some conflicting info about this needing to be set before main, so I am a bit more uncertain about that. Are you having any issues with it?
Regards,
Elfving
Yes, sir. I urgently need to put the NRF5340 into high-voltage mode. I want to set the value of the VREGHVOUT register to 5 using nrfutil, so that the default voltage level of the 5340 is 3.3V. Previously, I also saw that directly adding code to enable this function in the main.c of peripheral_uart might trigger the UICR hardware protection mechanism. Since UICR is quite important, I don't dare to erase it easily. So I would like to ask if there is any basis to prove that Edvin's code can be directly written in main.c. If it needs to be written before main.c, where should it be written? Should it be done in mcuboot?
Yes, sir. I urgently need to put the NRF5340 into high-voltage mode. I want to set the value of the VREGHVOUT register to 5 using nrfutil, so that the default voltage level of the 5340 is 3.3V. Previously, I also saw that directly adding code to enable this function in the main.c of peripheral_uart might trigger the UICR hardware protection mechanism. Since UICR is quite important, I don't dare to erase it easily. So I would like to ask if there is any basis to prove that Edvin's code can be directly written in main.c. If it needs to be written before main.c, where should it be written? Should it be done in mcuboot?
Hi again
Another thing to note is that in order to get these voltage levels you need to supply a higher voltage to VDDH.
HHJ said:Since UICR is quite important, I don't dare to erase it easily
I can try this myself sometime later this week if you want. But I am not sure if I understand; why not erase UICR if this is a part of a development process? Or do you want to tweak the output power of a gpio without flashing a new hex?
Regards,
Elfving
Thanks bro
The problem has been solved.
Great! Let us know if there is anything else
Regards,
Elfving