slow pin i/o manipulation

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

slow pin i/o manipulation

1,578 Views
Sly535
Contributor I
Good morning,
first, sorry for my poor english...
 
I'm starting with the Coldfire V2, I just buy a training card with MCF52223.
I was training with the most common device: I2C, UART ... However, I have a problem with the fast change state of a pin, I explain:
My Quartz is 48 Mhz, the Pll seems set correctly (I have a frequency of 80 MHz output CLKOUT), but the maximum frequency change of state is only 3.63 Mhz, is this normal or due to limitation ?
I watched the assembler code and it seems the simplest:
 
2000070A: 7001 moveq # 1, d0
2000070C: 13C04010000E move.b d0, 0x4010000E (0x4010000e)
20000712: 42394010000E clr.b 0x4010000E (0x4010000e)
20000718: 60F2 bra.s hand 0 xa (0x2000070c); 0x2000070c
 
result of
 
while (1)
{
 PORTTA=0x01;
 PORTTA=0x00;
}
 
thanks.

 


Message Edited by Sly535 on 2008-09-28 09:26 PM
Labels (1)
0 Kudos
4 Replies

327 Views
Sly535
Contributor I
Everything is explained.
After looking in the manual, I have not seen mention of this small details
I find it a shame, but I think myself out otherwise.
Thank you for your participation
0 Kudos

327 Views
Obetz
Contributor III
these are the (huge) waitstates of the off-platform peripherals - 12 cpu clock clock cycles. Some platform peripherals are slightly faster.

Is this still not documented in the current manual?

Oliver
0 Kudos

327 Views
Sly535
Contributor I
thank you for your reply.
I actually thought to use timers, but the concern is that I have control quickly a complete port to  drives an external CPLD.
I will look further tonight ...
0 Kudos

327 Views
RichTestardi
Senior Contributor II
That seems about right for programmatic GPIO pin control.  Depending on what you are trying to do, a DMA Timer might get you faster pin transitions, with more precise control.
 
From the manual:
When a timer reaches the reference value selected by DTRR, it can send an output signal on DTOUTn.  DTOUTn can be an active-low pulse or a toggle of the current output, as selected by the DTMRn[OM] bit.
0 Kudos