KEIL with LPC43xx?

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

KEIL with LPC43xx?

1,505 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Algorithm on Fri Aug 28 17:11:47 MST 2015
Hey guys , I'm using LPC4357 , and my IDE is Keil Microvision4 . When I start debugging, some registers are not in their reset states (nothing is called before main) like CCU1 registers. I wonder is this has anything to do with KEIL? or I need to upgrade to a newer version? or there is sth better than Keil for LPC ? .
Thx in advance 
Labels (1)
0 Kudos
Reply
7 Replies

1,460 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by MikeSimmonds on Mon Aug 31 06:46:14 MST 2015
Also, I think that the 43xx defaults to JTAG over SWD and isn't JTAG speed sensitive so that
if you change clock speed on it in mid debug it will have problems.

Mike.
0 Kudos
Reply

1,460 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by MikeSimmonds on Mon Aug 31 06:42:40 MST 2015
Again, I am not the best person to ask, but LPCXpresso is free to download for up to 256K of code debugging.
And the LPC-Link2 debug probe is cheap [15 Euro from Embedded Artists, a bit more from Farnell (Element14)
or Mouser or Digikey] which is the main supported adapter for LPCXresso.

I'd suggest that getting one would be a sound investment in that all of the LPCOpen etc. examples may be
tried.

I do not know Keil at all. NB some of the Keil compiler directives have different syntax etc.in LPCXpresso so look
into that if 'porting' from one to the other.

Regards, Mike.
0 Kudos
Reply

1,460 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Algorithm on Sun Aug 30 05:20:47 MST 2015
U have a point Mike, but according to the flow chart, and the Boot pins, I'm booting from the internal flash . Well , I noticed that as soon as I read from or write to the CCU1 registers , debugging would fail. This is the first time in encounter such situation. I'm using Keil 4 and JLINK and I used to program ST chips for yrs, but this never happens.
Does LPCexpresso has JLINK support? and is it free? 
0 Kudos
Reply

1,460 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by MikeSimmonds on Sun Aug 30 02:29:34 MST 2015
The ROM boot code will always run before handing over to user code!

I have not really got into 43XX yet, but I am sure that the UM has a boot flowchart
which implies that the cpu is always set to 96 MHz initially.
Therefore I would expect at least some of the clock generation unit registers to be
altered with respect to absolute chip reset status.

HTH, Mike.
0 Kudos
Reply

1,460 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Algorithm on Sat Aug 29 03:35:29 MST 2015
Thx djrose . I already know that , and I commented the SystemInit . The problem is that in debugging some registers are not in their reset state, like the CCU1 registers.
0 Kudos
Reply

1,460 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by djrose on Sat Aug 29 02:28:53 MST 2015
With Keil MDK there is a lot that can go on before you get to main.

The module 'startup_lpc43xx.s has this for a reset handler:

Reset_Handler   PROC
                LDR     R0, =SystemInit
                BLX     R0
                LDR     R0, =__main
                BX      R0


SystemInit (in system_LPC43xx.c) sets up hardware and __main is part of the C library that executes the runtime startup initialisation and subsequently calls main.

If you want to see the processor on entry to the code (and not at main), uncheck the 'run to main' option in the 'Options for Target' dialog.
0 Kudos
Reply

1,460 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by vtw.433e on Sat Aug 29 01:09:21 MST 2015
Use LPCXpresso?
0 Kudos
Reply