[Zephyr-devel] Power Configuration of nrf52840
Puzdrowski, Andrzej <Andrzej.Puzdrowski@...>
Hi So you must have supplied nRF52840 from VDDH pin – so it power regulator circuit works in high voltage mode.
Then internal regulator generate the GPIO output voltage: You need to set UICR->REGOUT0 properly, 5 is proper value for select 3.3 V
For more info see nRF52840 OPS, especjali POWER chapter
Andrzej
From: zephyr-devel-bounces@... [mailto:zephyr-devel-bounces@...]
On Behalf Of ashish.shukla@...
Sent: Wednesday, February 07, 2018 8:22 AM To: zephyr-devel@...; zephyr-users@... Subject: [Zephyr-devel] Power Configuration of nrf52840
Hello everyone !!! I'm working with custom PCB of nrf52840. I need to set VDD voltage which is also GPIO high level voltage equals to 3.3V, otherwise it's 1.8V by default.
or How can I access registers of nrf52840 in zephyr architecture?
-- Warm regards, Jr. Embedded Engineer Research & Development
Please consider the environment before printing this e-mail or its attachments.
Disclaimer: The information contained herein (including any accompanying documents) is confidential and is intended solely for the addressee(s). If you have erroneously received this message, please immediately delete it and notify the sender. Also, if you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or taking any action in reliance on the contents of this message or any accompanying document is strictly prohibited and is unlawful. The organization is not responsible for any damage caused by a virus or alteration of the e-mail by a third party or otherwise. The contents of this message may not necessarily represent the views or policies of Corvi
|
|
ashish.shukla@corvi.com <ashish.shukla@...>
Hi, Yes, I'm working in high voltage mode. VDDH = 3.6V NRF_POWER->DCDCEN0 = 0x01; // Enabling DC/DC for stage REG0 NRF_POWER->DCDCEN = 0x01; // Enabling DC/DC for stage REG1 Again, as you suggested NRF_UICR->EXTSUPPLY = 0x01; NRF_UICR->REGOUT0 = 0x05; After adding these lines at starting of main() function, It still measures 1.8V. -- Warm regards, Ashish Shukla Jr. Embedded Engineer Research & Development Please consider the environment before printing this e-mail or its attachments. Disclaimer: The information contained herein (including any accompanying documents) is confidential and is intended solely for the addressee(s). If you have erroneously received this message, please immediately delete it and notify the sender. Also, if you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or taking any action in reliance on the contents of this message or any accompanying document is strictly prohibited and is unlawful. The organization is not responsible for any damage caused by a virus or alteration of the e-mail by a third party or otherwise. The contents of this message may not necessarily represent the views or policies of Corvi
On Wed, Feb 7, 2018 at 4:16 PM, Puzdrowski, Andrzej <Andrzej.Puzdrowski@...> wrote:
|
|
Vinayak Kariappa
Hi Ashish,
toggle quoted messageShow quoted text
UICR is Flash, you need to do something similar to in soc.c done for reset pin config. Or use nrfjprog to write values to UICR
On 7 Feb 2018, at 12:04, "ashish.shukla@..." <ashish.shukla@...> wrote:
|
|
ashish.shukla@corvi.com <ashish.shukla@...>
Thanks everyone !!! Adding these lines does the job. NRF_NVMC->CONFIG = NVMC_CONFIG_WEN_Wen; while (NRF_NVMC->READY == NVMC_READY_READY_Busy){ } NRF_UICR->EXTSUPPLY = 0x01; while (NRF_NVMC->READY == NVMC_READY_READY_Busy){ } NRF_UICR->REGOUT0 = 0x05; while (NRF_NVMC->READY == NVMC_READY_READY_Busy){ } NRF_NVMC->CONFIG = NVMC_CONFIG_WEN_Ren; while (NRF_NVMC->READY == NVMC_READY_READY_Busy) { } -- Warm regards, Ashish Shukla Jr. Embedded Engineer Research & Development Please consider the environment before printing this e-mail or its attachments. Disclaimer: The information contained herein (including any accompanying documents) is confidential and is intended solely for the addressee(s). If you have erroneously received this message, please immediately delete it and notify the sender. Also, if you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or taking any action in reliance on the contents of this message or any accompanying document is strictly prohibited and is unlawful. The organization is not responsible for any damage caused by a virus or alteration of the e-mail by a third party or otherwise. The contents of this message may not necessarily represent the views or policies of Corvi
On Thu, Feb 8, 2018 at 12:17 AM, Vinayak Kariappa <vinayak.kariappa@...> wrote:
|
|
Chettimada, Vinayak Kariappa
Hope you are doing it “only once per board’s life time” else you could be degrading the flash. Hence, my advice is to use nrfjprog to make the change "only once" per each board or use the design in soc.c wherein the value is first compared before writing.
toggle quoted messageShow quoted text
-Vinayak
|
|
Vikrant More <vikrant8051@...>
But nrf52 flash support 10K write cycle. And it is like normal programming, isn't it ? Worrying after reading your this statement, since I'm now trying to save persistent data which generate during working of #BluetoothMesh on flash of nRF52. I used NFFS file system for testing.
On Feb 10, 2018 10:57 AM, "Chettimada, Vinayak Kariappa" <vinayak.kariappa.chettimada@...> wrote:
|
|
Chettimada, Vinayak Kariappa
1. Correction, values in UICR are at fixed location, changing them is not needed on every power up of the board.That said, after a change, a power cycle is need for h/w to load the new values. And yes, if you erase and flash UICR, its same as erase and flash
a new firmware.
toggle quoted messageShow quoted text
2. For your use case of storing frequently changing data, you need some sort of wear leveling.
|
|