Problem with LED blinking LPC11e14

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

Problem with LED blinking LPC11e14

1,171 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by drvrh on Thu Aug 20 03:05:34 MST 2015
Hello,

I have a problem with LED blinking and my LPC11e14, programming it's OK but on my ouput pin
have nothing. On all IO pin have voltage 3.2.

Code in attach
and schematic without crystal and WAKEUP pin not connected.

I don't know where is my problem.

And why I don't have options for run debug? Step into have grey and resume too.

Original Attachment has been moved to: test_4.zip

Labels (1)
0 Kudos
Reply
5 Replies

1,045 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by drvrh on Thu Aug 20 22:58:29 MST 2015
Thank you.
0 Kudos
Reply

1,045 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Badman on Thu Aug 20 07:11:59 MST 2015
Check this code
#include "LPC11Exx.h"

void delay(void)
{
volatile uint32_t i, j;

for (i = 0; i < 1000000; i++ )
j++;
}

int main(void) {

LPC_SYSCON->SYSAHBCLKCTRL |= (1<<6);// enable GPIO
LPC_GPIO->DIR[0] |= (1<<23);// P0.23 output

    while(1) {
    LPC_GPIO->SET[0] = (1<<23);// P0.23 high
    delay();

    LPC_GPIO->CLR[0] = (1<<23);// P0.23 low
    delay();
    }
    return 0 ;
}
0 Kudos
Reply

1,045 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by drvrh on Thu Aug 20 05:43:33 MST 2015
Thank you for answer.

Now I wouldl ike set IOCON pin 0.23 but I cann't set pin for GPIO.

How I set? If I set with

GPIOInit();
GPIOSetDir(0, 23, 1);
GPIOSetBitValue(0, 23, 1);

have no effect.

I set too with:

LPC_SYSCON -> SYSAHBCLKCTRL |= (1 << 16);
LPC_IOCON -> PIO0_23 |= (1 << 0x0);
GPIOInit();
....

No effect. How I set this pin for GPIO?

0 Kudos
Reply

1,045 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Badman on Thu Aug 20 04:45:39 MST 2015
If crystal is not connected you must write a function SystemInit or comment  out the call to SystemInit in function ResetISR in file test\src\cr_startup_lpc11exx.c

#if defined (__USE_CMSIS) || defined (__USE_LPCOPEN)
    SystemInit();
#endif


change on

#if defined (__USE_CMSIS) || defined (__USE_LPCOPEN)
    //SystemInit();
#endif
0 Kudos
Reply

1,045 Views
athmesh_n
Contributor IV

Hi @Badman

If systeminit is commented out, then how will clock be initialized? for internal clockircclock must be PLLed.

Thanks and Regards,

Athmesh Nandakumar

0 Kudos
Reply