Problem with LED blinking LPC11e14

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Problem with LED blinking LPC11e14

932件の閲覧回数
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

ラベル(1)
0 件の賞賛
返信
5 返答(返信)

806件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by drvrh on Thu Aug 20 22:58:29 MST 2015
Thank you.
0 件の賞賛
返信

806件の閲覧回数
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 件の賞賛
返信

806件の閲覧回数
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 件の賞賛
返信

806件の閲覧回数
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 件の賞賛
返信

806件の閲覧回数
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 件の賞賛
返信