Topics

[NRF52840] GPIO 1 problem


Felipe Gabardo Gonçalves <felipe@...>
 

Hi,

I'm trying to write a value to a GPIO port 1 on a custom board and to pca_10056 and I'm getting nothing on the output. On GPIO port 0 it works properly. My code has no secrets, I'm using blinky sample code from zephyr tag v1.13.0, and I just modified the folowing:

#define LED_PORT CONFIG_GPIO_P1_DEV_NAME #define LED NRF_GPIO_PIN_MAP(1, 6)

Does anyone know where I'm doing something wrong?

Thank you in advance,


pawel.dunaj@...
 

Hi,
NRF_GPIO_PIN_MAP will effectively change pin number from 6 to (32+6). This would be ok if you use nrfx but when you use Zephyr GPIO API you should use pin id as is. So you should write to CONFIG_GPIO_P1_DEV_NAME device using pin 6.
I.e. do not use NRF_GPIO_PIN_MAP macro.
Thanks,