ADuCM320 Hardware Reference Manual
UG-498
Rev. C | Page 93 of 196
I/O Data In Enable (GPxIE)
GPxIE enables the GPIO pin input levels to be available in GPxIN.
Open-Drain Enable (GPxODE)
GPxODE configures pins in output mode to open-drain mode. For P0 to P3 in this mode, the outputs can sink current if the
corresponding bit in GPxOUT.y is low. If the bit in GPxOUT.y is high, the pin is high impedance. For P4 and P5 in this mode, the outputs
can source current if the corresponding bit in GPxOUT.y is high. If the bit in GPxOUT.y is low, the pin is high impedance.
To enable a pin as an open-drain output, set the appropriate bits in GPxOEN and GPxODE.
If a pin is configured as an output, the internal pull-up is disabled even in open-drain mode regardless of GPxPULy.
If internal pull-ups are required in open-drain mode, it is possible to configure the GPIOs in pseudo open-drain mode by setting the
corresponding bits of GPxOUT and GPxODE to 0b0 and the corresponding bit of GPxPUL to 0b1. To change between a low output and
open-drain high with a pull-up, the corresponding bit GPxOE can be changed from 0b1 to 0b0.
Bit Set
Bit set mode is used to set one or more GPIO data outputs without affecting other outputs within a port. Only the GPIO corresponding
with the write data bit equal to 1 is set; the remaining GPIOs are unaffected.
Bit Clear
Bit clear mode is used to clear one or more GPIO data outputs without affecting other outputs within a port. Only the GPIO
corresponding with the write data bit equal to 1 is cleared; the remaining GPIOs are unaffected.
Bit Toggle
Bit toggle mode is used to toggle one or more GPIO data outputs without affecting other outputs within a port. Only the GPIO
corresponding to the write data bit equal to 1 is toggled; the remaining GPIOs are unaffected.