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

nRF52840 regulator configuration

Hello

I have just started development for the nRF52480 preview development kit.

I am powering the dev kit through USB on J2 (with power switch set to VDD).

I want to power peripherals with 3.3V so I am trying to write configuration for the REG0.

From what I can see from the OPS this requires changing EXTSUPPLY and REGOUT0 in the UICR registers, as well as DCDCEN0 in the POWER registers.

I have trouble finding any information on how to do this. I have found one function in the nrf_soc.h for the softdevice I might be able to use for enabling DC/DC converter but otherwise nothing.

For reference I am using SES for development.

Parents
  • Hi,

    Try to add something like this at the start of main() function

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

    Note: you might need to reset the board once for the new UICR configuration to take effect.

Reply
  • Hi,

    Try to add something like this at the start of main() function

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

    Note: you might need to reset the board once for the new UICR configuration to take effect.

Children
No Data
Related