MOD54415 IRQ question

Discussion to talk about software related topics only.
Post Reply
nicobari
Posts: 110
Joined: Mon Jan 30, 2012 12:15 pm

MOD54415 IRQ question

Post by nicobari »

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
User avatar
pbreed
Posts: 1091
Joined: Thu Apr 24, 2008 3:58 pm

Re: MOD54415 IRQ question

Post by pbreed »

Read the state of the pin....

Paul
nicobari
Posts: 110
Joined: Mon Jan 30, 2012 12:15 pm

Re: MOD54415 IRQ question

Post by nicobari »

Is there any specific way to read it because every time I read it I just get zeros.

Thanks again,
TM
User avatar
pbreed
Posts: 1091
Joined: Thu Apr 24, 2008 3:58 pm

Re: MOD54415 IRQ question

Post by pbreed »

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;
nicobari
Posts: 110
Joined: Mon Jan 30, 2012 12:15 pm

Re: MOD54415 IRQ question

Post by nicobari »

Hi I tried the above way before but it only returns zero!!

Thanks,
TM
User avatar
pbreed
Posts: 1091
Joined: Thu Apr 24, 2008 3:58 pm

Re: MOD54415 IRQ question

Post by pbreed »

If it only returns zeros, maybe only the low going ISR is happening?

Or maybe the high going ISR is a glitch....
nicobari
Posts: 110
Joined: Mon Jan 30, 2012 12:15 pm

Re: MOD54415 IRQ question

Post by nicobari »

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
Post Reply