/* Configure FCCU */
FCCU_SetProtocol(FCCU_BI_STABLE); //set Bi-Stable protocol if not in the SAFE mode
/* Init MODE ENTRY module */
MC_MODE_INIT(); /* (pll_init) Setup the MCU clocks and modes */
xcptn_xmpl (); /* Configure and Eable Interrupts */
dcache_disable();
PIT_Init();
PIT_Setup(0,50000000, 0.005);
MC33908_Init();
DSPI_Init(EEROM_DSPI_NB,MASTER,DSPI_CLK,EEROM_DSPI_BR,0);
if(Get_AppValid())
{
__asm__("e_lis %r12,0x00FB");
__asm__("e_or2i %r12,0x0004");
__asm__("e_lwz %r0,0(%r12)");
__asm__("se_mtlr %r0");
__asm__("se_blrl");
}
......
The above code runs in the bootloader main () function.
Get_AppValid () detects valid flags for applications in flash. The flags is stored at flash 0x11C0000. When the application download finished , the flags is set to 0x5555AAAA. The Get_AppValid () function check passes through assembly instructions jump to the application.
The application start address is 0x1040000,
app flash.ld
MEMORY
{
flash_rchw : org = 0x00FB0000, len = 0x4
cpu0_reset_vec : org = 0x00FB0004, len = 0x4
m_text : org = 0x1000000, len = 2048K
m_data : org = 0x40000000, len = 256K
int_dram : org = 0x50800000, len = 64K
}
Now after the download finished, bootloader reset, restart, run to the Get_AppValid (), jump into the APP operation. As a result, IVOR1 interrupts are generated. Single step debugging to see, the program jumped to the 0x1040000, and running 4 instructions, and then into the ivor1 interrupt.
Hope technical support can help solve. Determines whether or not to change the jump mode, or the chip needs to do relevant settings to modify the machine check function.