Program stop when Reset on a MCB1850

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

Program stop when Reset on a MCB1850

313 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by maxtippy on Thu Aug 29 02:15:31 MST 2013
Hello,

First, sorry for my bad english.

I have an lpc 1850 on a MCB1850. I'am using IAR Embedded Workbench ver. 6.60.

I want to boot from EMC32 bits, I put my jumper for that. When I download my code in debug mode there is no problem, the program work fine and start at address 0x1c000000 in the NOR Flash. But when I hit the reset button, the program stop and nothings happen's.

Someone know what I have to do for restart my program correctly after reset ?

Kind Regards,
Maxime
Labels (1)
0 Kudos
3 Replies

286 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by maxtippy on Tue Sep 10 01:03:54 MST 2013
Hi

Thank you for your help. it was very useful to me.

It was that my initialization code wasn't in the first 16K of Flash memory, I replace it and it's work fine.

Kind regards,
Maxime
0 Kudos

286 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mc on Thu Sep 05 06:37:33 MST 2013
Hi Maxime,
The LPC1850 ROM initializes only up to 16KB of external NOR flash. Its users responsibility to initialize higher addresses thereby higher memory. However the same time user needs to have initialization code within first 16KB of the NOR flash address space. Normally the debug script initializes whole NOR flash before it is used by the code. In this case you can place the initialization code anywhere in the NOR flash and your code will work, but it won't work once you run your application without debugger. therefore please ensure to place the initialization code within first 16KB of the NOR flash memory. I IAR you can use #pragma to place code at a particular location.

Hope it will help.

MC
0 Kudos

286 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by bavarian on Thu Sep 05 03:54:30 MST 2013
Hello Maxime,

when you start code via the debugger there is normally a script running which configures the chip upfront.
I think that booting from 32-bit NOR flash works fine after a reset, but in your code something is missing.
The debugger script contains this missing part, therefore the code starts running correctly.
Normally the problem is a missing initialization of the stack pointer and /or the IRQ vector table.

If you look into the examples for the MCB1850 board in the µVision directory under \Keil\ARM\Boards\Keil\MCB1800 and look into the file system_LPC18xx.c you should be able to find the correct way to do it.

Hope this helps to find the problem.
0 Kudos