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

QFN40 pin assignments on nRF52820 and nRF52833 are the same

Hi,

I started debugging a device with an nRF52820 chip and found that the pinout is similar to nRF52833. 

The test application was switching pin P0.15, but the ripple was on pin 14, which corresponds to pinout 52833.

I switched all pins as for 52833 according to the table and the device worked.

nRF52833_5F00_nRF52820_5F00_QFN40_5F00_Pinout_5F00_Comparison.xlsx

But the SDK cannot work with pin P1.09, because believes that there is only P0 port in the chip. Also in the system_nrf52820.c file there is no code for using NFC pins as GPIO. 

After I added the definition of the P1 port and code for unlocking the NFC pins, I was able to access pins P1.09, P0.09, P0.10.

I also see that in the SDK code there is a function nrf52_errata_230 (), which reads a configuration option from the FICR registers.

Next, the bit mask of available pins for port P0 is determined:

#define P0_FEATURE_PINS_PRESENT (nrf52_errata_230() ? 0xF0168E3Ful : 0x7017C1FFul)

Next, the function nrf_gpio_pin_present_check (uint32_t pin_number) determines whether a pin is available in this chip or not.
As a result, an assert is generated in the nrf_gpio_pin_port_decode (uint32_t * p_pin) function for some of the pins 52820 available according to the documentation.

The chip is marked:


FICR registers:
DEVICE:52820, variant:41414141(AAAA)
0x10000130:10, 0x10000134:0

Best regards,

Alex
Related