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
  • I saw elsewhere that it is best to not change the UICR values in runtime, since it is a configuration. So instead it should be written when downloading the firmware to flash. This would be needed when powering other peripherals, as they would otherwise get the wrong voltage until REGOUT0 is set properly.

    I have managed to do this in SES by adding UICR to the flash_placement file and adding a const value with the value I need.

    In flash_placement.xml:

    <MemorySegment name="UICR" start="$(UICR_START)" size="$(UICR_SIZE)">
      <ProgramSection alignment="4" keep="Yes" load="Yes" name=".uicr_regout0" start="0x10001304" size="4"/>
    </MemorySegment>
    

    In uicr_config.h (included in main.c):

    const uint32_t REGOUT0 __attribute__((section(".uicr_regout0"))) = 5;
    

    Now my only issue is that I have trouble getting the chip running in high voltage mode with the dev kit powered by J2. Any ideas for this?

Reply
  • I saw elsewhere that it is best to not change the UICR values in runtime, since it is a configuration. So instead it should be written when downloading the firmware to flash. This would be needed when powering other peripherals, as they would otherwise get the wrong voltage until REGOUT0 is set properly.

    I have managed to do this in SES by adding UICR to the flash_placement file and adding a const value with the value I need.

    In flash_placement.xml:

    <MemorySegment name="UICR" start="$(UICR_START)" size="$(UICR_SIZE)">
      <ProgramSection alignment="4" keep="Yes" load="Yes" name=".uicr_regout0" start="0x10001304" size="4"/>
    </MemorySegment>
    

    In uicr_config.h (included in main.c):

    const uint32_t REGOUT0 __attribute__((section(".uicr_regout0"))) = 5;
    

    Now my only issue is that I have trouble getting the chip running in high voltage mode with the dev kit powered by J2. Any ideas for this?

Children
Related