LPC1114 On pcb Program uploads but led not blinking

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

LPC1114 On pcb Program uploads but led not blinking

870 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by malikamalshan@hotmail.com on Fri Aug 14 04:00:37 MST 2015
Hi,

I have just started working with arm and chose LPC1114

I have mounted lpc 1114/302 chip (44pin version) on a pcb as shown in pcb.jpg and using LPC link 2 to debug.(jp2 closed jp1 open)

The blink code gets uploaded to the board and it says the programming is running, (LPC window.png).
I am attaching the code which i have used herewith.

However the led attached to the port 0_7 is not blinking. Instead, it has a slight glow and all gpio pins are pulled up.(measures +2.5V)

The connections from the link 2 to the ic is
pin 2- swdio, pin4- sclk , pin10- reset, pin6 pulled up. as shown in attached image (SWD.png). And reset pin pulled up externally.

I guessed there may be a problem in powering the IC using the Jtag connector itself from the link 2 and added external 3.3V power and commoned out the ground and still theres no result.

An external osillator is not connected. Could this cause an issue?

any Idea why this is not working???
Could you help me to get Blinky working on the chip

Many thanks

Original Attachment has been moved to: LPC11Uxx%20LPCXpresso%20Examples_0.zip

Labels (1)
0 Kudos
4 Replies

713 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Tue Aug 18 01:57:44 MST 2015
Download the correct toolchain:

'LPCXpresso LPC11C24 board

Supports LPC1111/12/13/14/15/00XL'

from:

https://www.lpcware.com/content/nxpfile/lpcopen-software-development-platform-lpc11xx-packages-0

Then create a new LPCXpresso C Project and include 'CMSIS_CORE_LPC11xx'.

Comment out the crystal part in SystemInit() of system_LPC11xx.c (CMSIS_CORE_LPC11xx):
void SystemInit (void)
{
#if (CLOCK_SETUP)                                 /* Clock Setup              */
#if (SYSCLK_SETUP)                                /* System Clock Setup       */
#if (SYSOSC_SETUP)                                /* System Oscillator Setup  */

[color=#f00]//  uint32_t i;
//  LPC_SYSCON->PDRUNCFG     &= ~(1 << 5);          /* Power-up System Osc      */
//  LPC_SYSCON->SYSOSCCTRL    = SYSOSCCTRL_Val;
//  for (i = 0; i < 200; i++) __NOP();
//  LPC_SYSCON->SYSPLLCLKSEL  = SYSPLLCLKSEL_Val;   /* Select PLL Input         */
//  LPC_SYSCON->SYSPLLCLKUEN  = 0x1;               /* Update Clock Source      */
//  LPC_SYSCON->SYSPLLCLKUEN  = 0x0;               /* Toggle Update Register   */
//  LPC_SYSCON->SYSPLLCLKUEN  = 0x1;
//  while (!(LPC_SYSCON->SYSPLLCLKUEN & 0x1));     /* Wait Until Updated       */
[/color]#if (SYSPLL_SETUP)                                /* System PLL Setup         */
  LPC_SYSCON->SYSPLLCTRL    = SYSPLLCTRL_Val;
  LPC_SYSCON->PDRUNCFG     &= ~(1 << 7);          /* Power-up SYSPLL          */
  while (!(LPC_SYSCON->SYSPLLSTAT & 0x1));      /* Wait Until PLL Locked    */
#endif
#endif
...


And now your LPC1114 is running with 48MHz from IRC    :exmark:
0 Kudos

713 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by malikamalshan@hotmail.com on Mon Aug 17 21:44:33 MST 2015
Thank you for your replies,

R2D2 Could you find me a sample code which would work in my configuration. I want to blink the LED purely by the chip (no crystals, no boards just from lpc link 2) itself as shown in the configuration.

The code i have used, its said that that would work with 1114.

And LanB, The code suggests 1 HZ flashing rate.

However I think the problem is in the code. It would be great if you could find me a sample code which would run on bare minimum

Thank you
0 Kudos

713 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by IanB on Fri Aug 14 09:03:11 MST 2015
How fast are you trying to flash it? Flashing it faster than 50Hz will look like a slight glow. What does the waveform on the LED pin look like?
0 Kudos

713 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Fri Aug 14 04:58:13 MST 2015
I'm confused  :~

You are flashing a LPC11Uxx sample in a LPC1114/302  :quest:  :O  :~

What's happening if you suspend the debugger?

Probably your init code is trying to use the external crystal and also trying to setup USB  :D
0 Kudos