IO-PIN TOGGLE TEST Not very fast?
2006-05-12 by ocnek1
Hello,
I wrote this little test to see how fast I could toggle an IO pin.
Using the way I did it here from rising edge to falling edge the time
is only ~540nS. This seems slow to me. Is it? I have verified that
the DesiredSpeed is indeed locked at ~60MHz
Thanks,
Oc.
int main( void)
{
IO1DIR |= (1 << 25);
(void)SetNativeSpeed(14746uL);
(void)SetDesiredSpeed(60000uL);
(void)SetMAM( 3u, MAM_full_enable);
(void)VPBControl(VPB_DIV1);
for(;;)
{
IO1CLR &= ~(1 << 25);
IO1SET |= (1 << 25);
IO1CLR |= (1 << 25);
IO1SET &= ~(1 << 25);
}
}