This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Unable to change VDD to 1.8V

Dear all

I am currently working with a nRF52840 Dongle, the ble_app_blinky_s140 example. 

To power some external circuits i have to set VDD to 1.8V.

Until now i tried the following approaches.

https://devzone.nordicsemi.com/f/nordic-q-a/20528/why-data-can-not-be-wrote-into-the-registers-of-nrf52840/80038#80038

by adding this two lines to the uicr_config.h

const uint32_t UICR_ADDR_EXTSUPPLY __attribute__((at(0x10001300))) __attribute__((used)) = 0xFFFFFFFF;//Enabled
const uint32_t UICR_ADDR_REGOUT0 __attribute__((at(0x10001304))) __attribute__((used)) = 0xFFFFFFF5;//3.3V

The second approach was to change the GPIO_OUTPUT_VOLTAGE_SETUP Function to 1.8V

None of these changed the Output Voltage.

Any idea why this doesn't work?

Regards

Marcel

Parents
  • In your case, that translates into this code:

    if (NRF_UICR->REGOUT0 != 0xFFFFFFF8) 
    {
    	NRF_NVMC->CONFIG = NVMC_CONFIG_WEN_Wen << NVMC_CONFIG_WEN_Pos;
    	while (NRF_NVMC->READY == NVMC_READY_READY_Busy){}
    	NRF_UICR->REGOUT0 = 0xFFFFFFF8;
    	NRF_NVMC->CONFIG = NVMC_CONFIG_WEN_Ren << NVMC_CONFIG_WEN_Pos;
    	while (NRF_NVMC->READY == NVMC_READY_READY_Busy){}
    }

  • What is the current value of your NRF_UICR->REGOUT0 register? Note that UICR is flash, and can only be written after erase. You can update the value by clearing bits, but you cannot set bitw without erasing. Erasing UICR can only be done by erasing the whole UICR area. The BOOTLOADER on the Dongle use some registers in UICR so I would not recommend erasing UICR as you risk bricking the device (the bootloader must be reflashed using a J-Link debugger).

  • As long as only the right bits in NRF_UICR->REGOUT0 are erased this should result in the wanted behaviour (0xFFFFFFF0 should set VDD_OUT to 1.8V).

    Is there any way to read out the NRF_UICR->REGOUT0 through the USB-Port or do i need to solder the P1 Pin Header?

    According to the nrf52840_Dongle_User Guide Chapter 6.7 SWD interface I should be able to connect the dongle to a DK (Debug In) and program it over the same connector.

    I assume this gives me the ability  to read out the UICR and to reflash the bootloader (in case the NRF_UICR is already messed up).

    Regards Marcel

Reply
  • As long as only the right bits in NRF_UICR->REGOUT0 are erased this should result in the wanted behaviour (0xFFFFFFF0 should set VDD_OUT to 1.8V).

    Is there any way to read out the NRF_UICR->REGOUT0 through the USB-Port or do i need to solder the P1 Pin Header?

    According to the nrf52840_Dongle_User Guide Chapter 6.7 SWD interface I should be able to connect the dongle to a DK (Debug In) and program it over the same connector.

    I assume this gives me the ability  to read out the UICR and to reflash the bootloader (in case the NRF_UICR is already messed up).

    Regards Marcel

Children
No Data
Related