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 Reply Children
  • Hi Jorgen

    Thank you for the quick response. I currently program the dongle via nRF Connect v2.5.0 - Programmer(experimental) 

    I use the hex File that SES produced (ble_app_blinky_10059_s140.hex) and the precompiled S140 Softdevice Hex File (\nRF5_SDK_15.2.0_9412b96\components\softdevice\s140\hex\s140_nrf52_6.1.0_softdevice.hex)

    If I add your Code right after (or before) the INIT() functions the VDD OUT Pin Voltage remains at 3.3V (3.3V is weird, given that the gpio_outupt_voltage_setup(), called from the leds_init(), should set the VDD OUT to 3.0V)

    i tried the following additions / changes to your code, none of them had the effect i wished:

    - Add NVIC_SystemReset() below    

    while (NRF_NVMC->READY == NVMC_READY_READY_Busy){}

    - Change the

    gpio_output_voltage_setup(void) 
    function to the 1V8

    - Changed 0xFFFFFFF8 to 0xFFFFFFF0 (as in the nrf52840_bitfields.h)

    I really have no clue what else could be wrong.

    Nice weekend anyhow

    Regards

    Marcel

  • 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

  • There is no way to read the value of the register directly over the USB port, without flashing a firmware that reads the value and transmit it over USB (USB CDC/MDS examples, etc.).

    Yes, the chip can be flashed using SWD interface in case of wrong values.

Related