I have a NetBurner 5234 interfaced to a linear quadrature encoder. It supplies A & B signals and an Index signal. The QD interface is configured to reset the PC (position counter) when the index signal is received. I'm monitoring the PC value and it resets when the index pulse is received.
How can I generate an interrupt to ther CPU when the index pulse is received?
I've tried the following -
// Enable interrupt on PC value = 0 or 0
fs_etpu_qd_set_pc_interrupts(SignalAChannel, 0, 0);
// SignalAChannel = 0
// SignalBChannel = 1
// IndexChannel = 2
// Simple isr to increment index count
INTERRUPT( index_isr, 0x2100 )
IndexCount = IndexCount + 1;
SetIntc(1, // INTC number (0 or 1)
27, // Source vector from Table 13-14 of MCF5234/5 Reference Manual
1, // Interrupt level
1); //Interrupt priority
I'm thinking the source vector is wrong, but what should it be?
Any and all comments welcome.