Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

Re: IO-PIN TOGGLE TEST Not very fast?

2006-05-12 by ocnek1

Wow German!!

Notes: Using WinARM + NewLib-LPC
       Olimex LPC-MT-2138 dev board
       Crystal @ 14.7456MHz
       -S option for size on optimization

What a difference.  On my dev board (LPC-MT-2138 from Olimex) the
rising edge to falling edge time is now down to 120nS though it is not
a 50% duty cycle.  Total period is about (rising to rising edge) 590nS
on my system.


Wow.




--- In lpc2000@yahoogroups.com, German Ortiz <elyop@...> wrote:
>
> You don“t need to do that way using IOCLR and IOSET. Try the following:
> 
>  for(;;)
>  {    
>    IO1SET = (1 << 25);	// This set pin P1.25 only, and leaves other
pins unchanged
>    IO1CLR = (1 << 25);	// This clear pin P1.25 only, and leaves
other pins unchanged
>  }
> 
> 
> If you are using the new lpc 2000 series ( such lpc214x, lpc213x or
lpc2103 ), you can test using FIOSETx and FIOCLR. Check the chapter
"General Purpose Input/Output ports (GPIO)" in the respective user manual.
> 
> Good luck!
> 
> German
> 
> ocnek1 wrotte:
> > 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);	
> >  }
> >
> >
> > }
> >
> >
> >
> >
> >
> >
> >
> >  
> > Yahoo! Groups Links
> >
> >
> >
> >  
> >
> >
> >
> >
> >   
> 
> 
> [Non-text portions of this message have been removed]
>

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.