The General Purpose Input/Output manages the I/O pins of the microcontroller. Each I/O line may be dedicated as a general-purpose I/O or be assigned to a function of an embedded peripheral. This assures effective optimization of the pins of a product.
The given example covers various uses of the GPIO controller and demonstrates different GPIO functionalities using the local bus interface.
This interface operates with high clock frequency (fCPU), and its timing is deterministic since it does not need to access a shared bus which may be heavily loaded.
To use this interface, the clock frequency of the peripheral bus on which the GPIO peripheral is connected must be set to the CPU clock frequency (fPBx = fCPU).
The example toggles PA10 on each CPU clock cycle. The CPU is set at the maximal frequency at which instructions can be fetched from flash without wait states, i.e. 33 MHz for UC3A & UC3A3 & UC3B devices, 25MHz for UC3L devices. Hence, the pin signal frequency is: