LPC4330 Xplorer Booting from Reset Problem

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

LPC4330 Xplorer Booting from Reset Problem

379 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by joohyun.seo on Wed Aug 27 08:27:37 MST 2014
Hi,

I am experiencing difficulty in in booting from reset. I am using a KEIL debugger, and I have played around with periph_blinky example, but I think I am missing some concept that doesn't only apply to KEIL.

I think I can successfully download the image to both internal flash (using DFUSec) and to external flash. I can see that the 12 MHz crystal is oscillating after I download the image. However, it doesn't start the code or main(). When I press Reset switch on the board, then the boot should be initiated from the internal flash if P2_7 is sampled high. Since I successfully downloaded the image into internal flash P2_7 is high when I RESET, and I expect to start the program from internal flash, but nothing happens. I also reset the board while sampling P2_7 to be low with boot switch configured for external flash, but nothing happens.

I think that the image that I download does not include something like 'startup from reset'. When I run the code for targeting external flash in the Debugger mode, then the code runs fine. I can even make the target address to be internal flash (Device : LPC4337 IROM Address starting from : 0x1A000000, and making setup(0x1A000000) in *.ini file). In both cases, once I run the code in Debugger mode, then it runs fine.

However, I cannot just make the code run by simply pressing the reset switch. I feel that the example code is meant to be debugging purpose so that the code should not be automatically executed, but I hope to implement the code that is executed from the reset.

Please help me learn more about this issue.
Labels (1)
0 Kudos
4 Replies

325 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by joohyun.seo on Wed Aug 27 10:14:43 MST 2014
Hi,

As I included the another command line after build as directed in your reference, it works fine. I can see the LED blinking by simply pressing RESET switch. Thank you.

I have a supplemental question. I also want to download the image using DFU programmer. So what I did is to generate the bin file by inserting following command in Options for Targets - User - Run User Programs After Build/Rebuild

: C:\Keil\ARM\ARMCC\bin\fromelf.exe --bin --output=periph_systick.bin periph_systick.axf

Then, I opened the DFU programmer and include binary file in HDR/RAW modes tab with Auto append header to the binary image and Auto-verify header on boot enabled. Then, I generate binary file with header. Next, in program mode, I include the *.bin.hdr file and specify the address 0x1A000000, size 0x00010000, and Param 0x00000000. I also enabled the verify image after programming by reading it back, and compute/insert checksum in image before programming.

Then, I press START to download the image. However, with this approach after I reset the board, the board doesn't show any activity.

To my understanding, I converted *.axf (which works fine by downloading it using the Debugger mode) into *.bin so *.bin should be correct. So I thought that this method should work, but unfortunately, it is not working. There is no particular error message in Output log nor Program Log.

I also tried with 'Compute/Insert checksum in image before programming' disabled, but it doesn't show any difference.

Many thanks in advance.
0 Kudos

325 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mc on Wed Aug 27 09:13:24 MST 2014
For internal flash probably checksum. Read below thread.
http://www.keil.com/support/docs/3592.htm.
0 Kudos

325 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by joohyun.seo on Wed Aug 27 09:01:04 MST 2014
Hi MC,

Yes, it is lpcopen_2_12_keil_iar_ngx_xplorer_4330.
0 Kudos

325 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mc on Wed Aug 27 08:45:00 MST 2014
Hi joohyun,
Are you using periph_blinky from LPCOpen? Please let us know the exact project and target used by you?
0 Kudos