I have developed custom boot-loader for the TMS320F28335 . I've partitioned the boot-loader and application code into two separate projects. The boot-loader use flash sector A and the application uses flash sector B-C-D. Other flash sector are used to store data.
The boot mode for TMS320F28335 is configured to jump to flash. At the address 0x33FFF6 there is the first instruction of my boot loader.
At startup my custom boot make a system configuration and than jump to application without problem.
Now, some time I need to jump from my application to a specific istruction (address 0x338000) of my custom boot. To do this I call function prepare_to_jump:
.text
_prepare_to_jump:
SETC INTM;
ZAPA;
MOV @SP,#0;
PUSH ACC;
PUSH AL;
MOV AL, #0x0a08;
PUSH AL;
MOVL XAR7, #0x33800;
PUSH XAR7;
POP RPC;
POP ST1;
POP ST0;
POP IER;
POP DBGIER;
LRETR;
By doing this I've an ITRAP istruction that generate a system reset! Where I'm doing wrong?
Thanks in advance,
Mauro.