I'm running into an issue I don't fully understand. I have an FIQ occuring at initialization on the TMS570 prior to setting up the VIM and prior to enabling FIQs via the CPSR register. In this case it is an ESMH error, which for the 570 is setup as an NMI on VIM channel 0. The following are what I think are the relevant steps in my startup sequence:
1) Power On:
ESMH error is active. FIQIVec register is set to "1" which properly indicates channel 0 (ESMH) interrupt. However, since the VIM has not yet gone though initialization, FiqVecReg doesn't have the proper address for ESMH interrupt handler routine. "F" bit in CPSR is "1" - FIQs disabled.
2) VIM Initialization occurs:
VIM is initialized for priority mapping and the interrupt vector tables are populated by coping proper addresses into VIM RAM. "F" bit in CPSR is still "1" - FIQs disabled. However, I am noticing that as the copy is occurring to populate the interrupt vector tables, the IrqVecReg and the FiqVecReg are both getting set to the address of the phantom interrupt vector.
3) FIQ interrupts get enabled:
Some time later, I clear the "F" bit in CPSR to enable FIQs. This then causes the pending FIQ that occured at power on to be serviced. My FIQ interrupt handler jumps to the address in FIQVecReg, which is incorrectly pointing to the phantom interrupt vector (Ideally it would be pointing to my ESMH interrupt handler).
I think this leads me to two questions: What is the recommend method for handling ISR requests prior to the VIM being configured (or at least some suggestions)? Also, what would be causing the IrqVecReg and FiqVecReg to be populated with the phantom interrupt vector when VIM RAM is being loaded in step 2?