LPC11U24 speed

27 Jan 2012

I am trying to generate a digital pattern using the following code. I only got 12MHz and thought the speed was supposed to be 24MHz (48MHz/2) for LPC11U24. What did I make a mistake? I used pin5 for the output.

--

#include "mbed.h"

int main() {   
    LPC_GPIO->  DIR[0] |= (0x00000200);    
    LPC_GPIO-> MASK[0] |= (0xFFFFFDFF);  
    while(1) {
    //
    LPC_GPIO-> PIN[0]=(0x00000200);
    LPC_GPIO-> PIN[0]=(0x00000000);
    LPC_GPIO-> PIN[0]=(0x00000200);
    LPC_GPIO-> PIN[0]=(0x00000000);
    LPC_GPIO-> PIN[0]=(0x00000200);
    LPC_GPIO-> PIN[0]=(0x00000000);    
    LPC_GPIO-> PIN[0]=(0x00000200);
    LPC_GPIO-> PIN[0]=(0x00000000);
    //
	}}  
27 Jan 2012

I still didn't resolve this problem.

28 Jan 2012

Try assigning the location to a seperate pointer and accessing that pointer instead of using the deference (->) operator.

31 Jan 2012

Igor,

Thanks for your reply. Can you kindly show me how to do it?