4 of 4 people found this helpful
Not quite clear what you exactly mean. Toggling an LED in software is a direct write to the GPIO pin.
A hardware approach usually takes a PWM or a Timer component and connect the appropriate output to the GPIO
A mixture is a Timer component connected to an interrupt. In the handler toggling the LED. I personally prefer that method because this single timer can perform additional jobs at maintaining an internal clock, delays and waits.
Actually the Control Registers output cannot be connected to the Macrocell's clock input of a UDB. So, the 12MHz clock is connected to the TFF's clock input and the Control Register's output is connected to the TFF's clock enable input. As the result there will be a short latency from the rising edge of the Control Registers' output and the TFF's output.
This is an another solution with a same concept.
Both the Control Register's output and the TFF's output are explicitly synchronized to the 48MHz HFClk.