Dynamic GPIO Mode Configuration – KBA90586

Version 1
    Version: **


    Question: How do you make a GPIO pin dynamically controllable by the CPU or by a digital block?



    Using the PRTxGS register, you can dynamically control the source of the signal that is driving the GPIO. Writing ‘0’ to a bit field in this register allows the corresponding pin to be controlled by the value of PRTxDR register. If logic ‘1’ is written to the PRTxGS register, then the global function of the corresponding pin is enabled. Based on the drive mode of the pin, the pin is configured as a global input pin or a global output pin.