Code not running after reset , but works well when debugging!!

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

Code not running after reset , but works well when debugging!!

646 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Algorithm on Wed Aug 12 06:08:19 MST 2015
Hullo guys, I'm new to the LPC4357 , I'm using JLINK and KEIL .
Im just trying to turn on an LED with the following code :
.
.
void main ()
{
scu_pinmux(9,3,MD_PDN,FUNC0);
GPIO_SetDir(4,(1<<15),1);
GPIO_SetValue(4,(1<<15));
while(1);       
}
the problem is that after programming the flash, the code does not work and all LEDs are turned on but very dimmed . When I enter debugging mode , everything works fine . All LEDs are turned off and only the LED i chose is on .
What could the problem be ??
Labels (1)
0 Kudos
Reply
4 Replies

610 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Algorithm on Wed Aug 12 15:03:32 MST 2015
It worked !!
Everything was ok, except for a stupid missing pre-processing line to be written in the debugger menu.
I'm using Open43xx board from waveshare. :) :)
0 Kudos
Reply

610 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mc on Wed Aug 12 12:26:23 MST 2015
Hi Algorithm,
1) Are you using your own board?
2) Check reset pin
3) If frequency of operation is more than 90MHz please look into section 13.2.1 of UM. See below link
http://www.nxp.com/documents/user_manual/UM10503.pdf
4) Are you using LPCopen?
5) Can you also check TRST pin during boot?
0 Kudos
Reply

610 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Algorithm on Wed Aug 12 08:26:13 MST 2015
Thx a lot mc for ur reply .
P2_7 is already pulled-up , which means it must boot from the internal flash .
I do not think its hardware issue now , when I turned on the board for the first time , it executed the demo code, which means that hardware is set properly. Im using JLINK , and i guess its software issue. When i start debugging then stop it , it keeps working fine . But still can not reset it on HW.
0 Kudos
Reply

610 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mc on Wed Aug 12 08:20:45 MST 2015
Hi Algorithm,
Could  you please check port P2_7. Can you pull it up if it is not pulled up?
0 Kudos
Reply