Content originally posted in LPCWare by smalouin on Fri May 02 06:25:43 MST 2014
A bit more digging into it leaves me even more clueless...
I step through the whole process in assembler and I don't know where to go next.
When the IAPEntry function is called I see this:
[list=1]
[*] the program jumps to the IAP code (PC=0x10400100 as expected ---> So I am calling IAPentry correctly?
[*] R0 contains 0x100000E0 which is my command array location (I see {0x39,0x00,0x00,0x00,0x00,0x00} there) ---> that tells me the command *IS* 57d as expected for ISP re-entry?
[*] R1 contains 0x100000F4 which is my result array location(I see {0x00,0x00,0x00,0x00,0x00,0x00, 0x00} there ) ---> and my result is empty as it should?
[*] If I step linearly from there (0x10400100) it goes step by step straight until 0x1040012A and then... hardfault
[/list]
!?
eeprom code error? Or I am missing something like setting the SP to something (I tried __set_MSP(*((uint32_t *) 0x10400000))... but that didn't help.