i am designing an ethernet bootloader for LPC1768 keil. so far i wrote a code that recieve new firmware over TCP\Ip and store it in flash memory using IAP, then by setting new sp and pc jump to the address of new firmware.
i tested a simple blinky example which i wrote myself with using this code to jump and it works,
SCB->VTOR = (IMG_START_SECTOR & 0x1FFFFF80);
p = (unsigned *)(IMG_START_SECTOR+4 );
user_code_entry = (void (*)()) *p;
i tested sample blinky from keil ,it didn't work and i just enabled interrupt before jumping ( __enable_irq(); ) then it worked.
but for any other little bigger firmwares ,after jumping and executing , program hangs. i looked at the memory of address, which programms hangs on it and most of them are same ( its somthing like EF E7 E7 E7 EF E7 ... )
can anybody tell me please what can be a problem?
thank you all