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

Open Drain output for GPIOTE task pin

It appears that when setting a GPIO pin up to be used by the GPIOTE module as an output task the GPIOTE module takes over the configuration of the pin. It does not appear that it is possible to set the pin in Open Drain configuraiton as you can with the GPIO module itself because GPIOTE overrides this as soon as the task is enabled. Is this correct or am I missing something obvious?

Parents
  • Playing around with this I found that I could reconfigure the port pin immediately after enabling the GPIOTE task so it becomes open drain instead of a totem pole output. Is this the right way to do it though? Seems like there ought to be a way to set the port up as open drain before it gets enabled by GPIOTE. I did set the output to be initially low so the port does not try to drive the pin high before it is reconfigured but this does not seem ideal.

Reply
  • Playing around with this I found that I could reconfigure the port pin immediately after enabling the GPIOTE task so it becomes open drain instead of a totem pole output. Is this the right way to do it though? Seems like there ought to be a way to set the port up as open drain before it gets enabled by GPIOTE. I did set the output to be initially low so the port does not try to drive the pin high before it is reconfigured but this does not seem ideal.

Children
Related