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

Pullup/pulldown GPIOTE

Hi!

I'm reading the PS for nRF52832 and I can't find a clear answer on the following question.

If I set up a GPIO channel with pull-up/pull-down in the PIN_CNF[n] register and then want to use that channel as a GPIO task/event (GPIOTE). Does the GPIOTE logic some how remove my pull-up/pull-down setting or is it still active?

The reason I ask is that I understand that GPIOTE logic changes for example the GPIO configured DIR..

Best regards

Parents
  • Hello bitFrost

    The nrf_drv_gpiote_in_init will overwrite the pull config of your gpio pin. The function takes in three attributes, pin number, configuration of the pin and event handler. It is in the configuration struct the pull must be defined. If you look at line 495 in nrf_drv_gpiote.c you can see the function configures the pin with the pull specified in the config struct.

    So to keep your pin configuration, make sure the config struct you forward to it has the right settings.

    Best regards

    Jørn Frøysa

  • According to nRF52832_PS_v1.2 (section 21.3) GPIOTE will (when enabled on that pin) override the DIR setting in GPIO. So I was wondering if anything else in PIN_CNF[x] was overridden or disabled, for example the PULL fields.

Reply Children
No Data
Related