cancel
Showing results for 
Search instead for 
Did you mean: 

Pb with EIC register access

pchignon
Associate II
Posted on May 25, 2005 at 13:33

Pb with EIC register access

4 REPLIES 4
pchignon
Associate II
Posted on May 25, 2005 at 12:37

Hi,

I try to coupling together CMX RTOS and the 71x_lib. First of all I should couple IRQ and EIC.

So, I programmed IRQ handler to get the current EIC interrupt. Then call to the corresponding IVR. Clear the pending bit and leave the IRQ_mode.

Here is my IRQ_handler called by cmx IRS :

void cmx_irq(void)

{

// call the right handler from EIC

// Get the IRQ channel number

// Clear pending bit

// return (warning spsr ????)

void (*handler)(void);

u8 current_it;

handler=(void (*)())EIC->IVR;

current_it = (u8)EIC->CICR;

handler();

EIC->IPR = 1<

}

I enable the wakeup button to EIC/XTI. I can see my cmx_irq called with the right handler.

Also, I can see the disassembly code of the last instruction EIC->IPR = 1<

Amazingly, the IPR is not correctly clear. So my interrupt handler cannot handle other interrupts and my program is stopped.

Can anybody help me to solve my problem or help me to investigate?

Regards,

Ludo

pchignon
Associate II
Posted on May 25, 2005 at 12:59

Sorry,

I give you the line missing:

EIC->IPR = 1<

pchignon
Associate II
Posted on May 25, 2005 at 13:05

Sorry,

I think I found a bug in the forum

I try a new method :

EIC->IPR = 1 < < current_it; /* Set the bit to clear it */

_____________^^^ There is of course no blank

pchignon
Associate II
Posted on May 25, 2005 at 13:33

Thank you very much.

Your are right.