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

Reply
  • 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

Children
Related