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){}
    }

  • 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

Reply
  • 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

Children
No Data
Related