On an LPC5502 I try to read 512 bytes from the flash at address 0xF800. This works most of the time but sometimes the FLASH_Read function does not return but either the controller restarts itself or it jumps to 0xdeadbeee.
Watchdog is disabled, FLASH_Init returns with success. There seems to be also a timing involved, because if I put debug output, it does not happen that often anymore. Interrupts are off during the read.
Is it necessary to wait after init or what could be the reason for that?