Skip to content

Conversation

needs-coffee
Copy link

the CPP Define NRF52 becomes defined in the nrf5.py file (by "%s" % board.get("build.mcu", "")[0:5].upper(),)
This definition sets the MCU to NRF52832 for backwards compatibility.

The NRF52840 has 2 GPIO ports (P0 with 32 GPIOs and P1 with 16 GPIOs)

Using an NRF52840 MCU on a custom board or the NRF52_dk (PCA10056) board results in only being able to access P0 due to the MCU being defined as NRF52832, resulting in GPIO_COUNT == 1

This does not allow the P1 pins to be accessed (P1.00 > P1.15)
These pins are used for the Arduino style header on the PCA10056 board.

This fix checks for an existing MCU definition and will not redefine this as NRF52832 (which only has as single GPIO port)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant