Hi,
I am using IRQ on MOD54415 to generate interrupts on both rising and falling edge. How can I figure out which edge caused the interrupt?
Thanks,
TM
MOD54415 IRQ question
Re: MOD54415 IRQ question
Read the state of the pin....
Paul
Paul
Re: MOD54415 IRQ question
Is there any specific way to read it because every time I read it I just get zeros.
Thanks again,
TM
Thanks again,
TM
Re: MOD54415 IRQ question
See section 18.54.5 of the MCF5441XRM.pdf
Or try...
#include <sim.h>
//Read the current state of ALL IRQ pins...
//Bit 7 ie 0x80 will be IRQ7
//Bit 6 ie 0x40 will be IRQ6
//Bit 5 ie 0x20 will be IRQ5
//Bit 4 ie 0x10 will be IRQ4
//Bit 3 ie 0x08 will be IRQ3
//Bit 2 ie 0x04 will be IRQ2
//Bit 1 ie 0x02 will be IRQ1
BYTE state=sim2.eport.eppdr;
Or try...
#include <sim.h>
//Read the current state of ALL IRQ pins...
//Bit 7 ie 0x80 will be IRQ7
//Bit 6 ie 0x40 will be IRQ6
//Bit 5 ie 0x20 will be IRQ5
//Bit 4 ie 0x10 will be IRQ4
//Bit 3 ie 0x08 will be IRQ3
//Bit 2 ie 0x04 will be IRQ2
//Bit 1 ie 0x02 will be IRQ1
BYTE state=sim2.eport.eppdr;
Re: MOD54415 IRQ question
Hi I tried the above way before but it only returns zero!!
Thanks,
TM
Thanks,
TM
Re: MOD54415 IRQ question
If it only returns zeros, maybe only the low going ISR is happening?
Or maybe the high going ISR is a glitch....
Or maybe the high going ISR is a glitch....
Re: MOD54415 IRQ question
For now I changed my code to go into interrupt at rising edge. Will post if I have success with the previous one.
Thanks again,
TM
Thanks again,
TM