LPC1776 loading incorrect value from internal RAM

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by Alex on Thu Aug 28 01:41:52 MST 2014

I wrote a program, which is going to be started by a bootloader also written by me.

When the program is started by the bootloader it sets the stack pointer back to the start of stack. But unfortunately the stack pointer loaded from addrs 0 is incorrect. As you can see on the screenshot the stack pointer should be 0x100010E8 but the value that is received from RAM is 0x10001FFC. This lead to a hard fault later in the program.

The screen shot shows the startup code (program entry point), the memory at address 0, the disassembly and the current CPU registers after executing MSR.

Any ideas what is going wrong there?

Best regards