Forum Discussion
Altera_Forum
Honored Contributor
16 years agoAfter making some debug I think I know the reason of the endless loop.
The problem was that in the MPU_usage example, when the first fail condition is detected the program exits with the following code: alt_printf("FAIL\n");
exit(1); But the library function exit() seems to be implemented as "call 0", even when there is no memory at address 0. Program control is then transferred to address 0, and the processor reads an all ones word (FFFFFFFF) as opcode. The attempt to execute this opcode provokes an exception with cause "Illegal instruction". The same is repeated at address 4, 8, and so on, sweeping unpopulated memory space from address 0 until reaching the reset vector at the start of my RAM.