Skip to content

nrf: Incorrect pin voltages #1174

Closed
Closed
@dhalbert

Description

@dhalbert

The nRF52840 can be set to supply different voltages on its GPIO pins. If the chip is used in "high voltage mode" (so-called due to how the internal regulators are used and how the VDD and VDDH pins are connected), then the UICR->REGOUT0 register can be used to vary the voltage on the GPIO pins.

The PCA10059 dongle is set up to use "high voltage mode".

If you erase the NVM (say with some firmware erase command), then the UICR->REGOUT0 register is set to all 1's, and it uses the default voltage of 1.8V. I verified this with a random GPIO pin.

Both @jerryneedell and I noticed this, because the on-board red LED was really dim and the RGB led would only display red (because the green and blue parts need >1.8v). We had both erased the NVM before loading a new bootloader.

The temporary fix is to go into gdb and do:

(gdb) set *0x10001304 = 5

and then reset the board (it won't take effect without a reset, it appears).

This will set UICR->REGOUT0 to use 3.3V as the specified voltage.

The real fix is to make CircuitPython check the value of this register on startup and change it to 0x5 if it's not already. Let's not write it every time so as not to wear the NVM.

The PCA10056 appears to be wired differently and is in "normal voltage mode", not "high voltage mode". In normal mode the value of REGOUT0 has no effect.

However, measuring a HIGH on a random GPIO pin on the PCA10056 shows about 3.04V, so that's another puzzle.

I haven't looked yet at how the Feather nRF52840 is powered; probably it is in normal mode and uses an external regulator to get 3.3V.

The nRF52832 does not have REGOUT0.

Tagging @jerryneedell @arturo182 @tannewt @ladyada @hathach for a heads-up.

PCA10059 issue also noted here: https://devzone.nordicsemi.com/f/nordic-q-a/38205/flashing-pca10059

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions