nrf52840 high voltage mode not working

We’re migrating from the nrf52833 to the nrf52840 and noticing some major differences in how they react to being connected Via USB. Our VBUS and Data lines are connected to the port in both devices. On the 52833 board, we see that our device will power on over USB bus power, but the 52840 will not. Are there any changes to the firmware we need to make in order to make this upgrade? We are using LDO mode for Reg 0 and supplying both VDDH and VBUS inputs with the USB 5V

We have tried adding the following code to prj.conf:

CONFIG_USB_DEVICE_STACK=y
CONFIG_USB_DEVICE_VID=0x1915
CONFIG_USB_DEVICE_PID=0xCAFE
CONFIG_USB_SELF_POWERED=n

  • Some additional info on the problem:

    We are setting REGOUT0 to 3V, but we are measuring 1.8V when powering via USB or battery. Here is the function setting REGOUT0

    void configure_reg0_voltage(void) {
        // Enable write access to the UICR registers
        if ((NRF_UICR->REGOUT0 & UICR_REGOUT0_VOUT_Msk) == UICR_REGOUT0_VOUT_DEFAULT) {
            NRF_NVMC->CONFIG = NVMC_CONFIG_WEN_Wen; // Enable write mode
            while (NRF_NVMC->READY == NVMC_READY_READY_Busy) {} // Wait for NVMC to be ready
    
            // Set the desired voltage (e.g., 3.0V)
            NRF_UICR->REGOUT0 = (UICR_REGOUT0_VOUT_3V0 << UICR_REGOUT0_VOUT_Pos);
    
            NRF_NVMC->CONFIG = NVMC_CONFIG_WEN_Ren; // Enable read-only mode
            while (NRF_NVMC->READY == NVMC_READY_READY_Busy) {} // Wait for NVMC to be ready
    
            // Reset for changes to take effect
            NVIC_SystemReset();
        }
    }

  • After some more debugging, we have narrowed down the issue. REGOUT0 is in fact being set properly. However, MAINREGSTATUS is 0 (this is when we are only powering via the jtag 

Related