dislocation of Program counter to BOOT Rom instead of flash

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

dislocation of Program counter to BOOT Rom instead of flash

1,247 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by parav on Tue Jan 03 00:16:40 MST 2012
my new lpc1769 stopped working when i connected to a relay board it is to be noted that one of the pin used was p2.10 that is of-course an ISPen pin though the code is downloading both via flash magic and LPC Link but it's not running i followed the traditional procedure with reset and ISP pin and there was a development it started the debuger to show the values of core register and there it showed that lpc's program counter is in the boot rom not in the flash by under the disassembler tab i got the following assembly code that was also got by another member too:
1fff0ba2:    ldr r0, [r4, #20]
1fff0ba4:    lsls r0, r0, #28
1fff0ba6:    bmi.n 0xfff0ba2

i tested the voltage on isp pin2.10 and got 2.02V at all times.:confused:
is my lpc dead or alive :(
0 Kudos
Reply
10 Replies

1,212 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Tue Jan 03 07:25:39 MST 2012

Quote:

...give the solution...

The solution is given above :mad:

Check P2.10 with a scope and check your code (is it 'valid' ?) :eek:


User manual:

Quote:

32.3 Description
The flash boot loader code is executed every time the part is powered on or reset. The
loader can execute the [COLOR=Red]ISP[/COLOR] command handler or the user application code. A LOW level
after reset at pin P2.10 is considered an external hardware request to start the ISP
command handler. Assuming that power supply pins are on their nominal levels when the
rising edge on RESET pin is generated, it may take up to 3 ms before P2.10 is sampled
and the decision on whether to continue with user code or ISP handler is made. If P2.10 is
sampled low and the watchdog overflow flag is set, the external hardware request to start
the ISP command handler is ignored. If there is no request for the ISP command handler
execution (P2.10 is sampled HIGH after reset), a search is made for a valid user program.
If a valid user program is found then the execution control is transferred to it. If a valid user
program is not found, the auto-baud routine is invoked.
Pin P2.10 is used as a hardware request signal for ISP and therefore requires special
attention. Since P2.10 is in high impedance mode after reset, it is important that the user
provides external hardware (a pull-up resistor or other device) to put the pin in a defined
state. Otherwise unintended entry into ISP mode may occur.


Quote:

32.3.1.1 Criterion for [COLOR=Red]Valid User Code[/COLOR]
The reserved Cortex-M3 exception vector location 7 (offset 0x 001C in the vector table)
should contain the 2’s complement of the check-sum of table entries 0 through 6. This
causes the checksum of the first 8 table entries to be 0. The boot loader code checksums
the first 8 locations in sector 0 of the flash. If the result is 0, then execution control is
transferred to the user code.

0 Kudos
Reply

1,212 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by parav on Tue Jan 03 07:12:53 MST 2012

Quote: TheFallGuy
Given that you are stuck in the Bootloader, my guess is that the ISP is stuck active! I don't think there is anyway you can check this in LPCXpresso - you need a scope.


if the ISP is stuck active please give the solution to make it right.:(
0 Kudos
Reply

1,212 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by TheFallGuy on Tue Jan 03 06:33:52 MST 2012
Given that you are stuck in the Bootloader, my guess is that the ISP is stuck active! I don't think there is anyway you can check this in LPCXpresso - you need a scope.
0 Kudos
Reply

1,212 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by parav on Tue Jan 03 06:12:25 MST 2012

Quote: Zero
Did you scope Reset and ISP already to confirm that ISP is high after Reset (low->high) :confused:


yes it was the first thing i did. my question was if there is connection lost or got short with other path so if there was a way to check it through lpc xpresso
0 Kudos
Reply

1,212 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Tue Jan 03 05:25:48 MST 2012
Did you scope Reset and ISP already to confirm that ISP is high after Reset (low->high) :confused:
0 Kudos
Reply

1,212 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by parav on Tue Jan 03 05:16:19 MST 2012

Quote: TheFallGuy
- ISP is active



how to check via software if it is active or not
0 Kudos
Reply

1,212 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by parav on Tue Jan 03 05:15:11 MST 2012

Quote: TheFallGuy
- invalid checksum in the Flash


i ve verified code with flash magic. and i think it is also checked by lpcxpresso
0 Kudos
Reply

1,212 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by TheFallGuy on Tue Jan 03 05:04:01 MST 2012
If the ROM bootloader is stuck, it will be because of the following reasons:
- invalid checksum in the Flash
- ISP is active

Suggest you check both of the above.
0 Kudos
Reply

1,212 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by parav on Tue Jan 03 03:31:45 MST 2012

Quote: Zero

#2 Connect a pullup (10k) to ensure that it's high at reset :)


thanks for your fast reply,
tried using pull up but nothing happened

there's another development i would like to share when i changed the pc to the address 0x1fff1fc0 then it went to hard fault handler than by editing the code under hard fault i finally ran the main code.
So through debug setting the code is running but code still not able to run  after resetting.
0 Kudos
Reply

1,212 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Tue Jan 03 02:06:10 MST 2012
#1 Disconnect everything from P2.10 :rolleyes:

#2 Connect a pullup (10k) to ensure that it's high at reset :)

#3 Try it again....
0 Kudos
Reply