roland.ames wrote:It can be done.
Have a look at the Freescale Manual for the MCF5282, provided in the docs folder.
You should look at the chapter describing the Edge Port Module, as this covers IRQ inputs.
Specifically the EPPAR , which configures each of IRQ1 - IRQ7 independently.
IRQ1 can be configured as a level-sensitive interrupt input, active low.
this is my program:
INTERRUPT(out_irq1_pin_isr, 0x2600 )
{
sim.eport.epfr=0x02; /* Clear the interrupt edge 0 0 0 0 0 0 1 0 */
OSSemPost(&IrqPostSem);
}
{
sim.eport.eppar= 0x0000; /* 00 00 00 00 00 00 00 00 see table
11-13 in UM
00 Pin IRQx level-sensitive
01 Pin IRQx rising edge triggered
10 Pin IRQx falling edge triggered
11 Pin IRQx both falling edge and rising edge triggered*/
sim.eport.epddr= 0x0 ; /* All edge port pins as inputs */
sim.eport.epier = 0x0002; /* Enable IRQ1 only 0 0 0 0 0 0 1 0 */
SetIntc( 0,/* The first interrupt controller */
( long)&out_irq1_pin_isr, /* Our interrupt function */
1, /* The vector number from the users manual table 10-13 */
1, /* Set this to priority 1 but any value from 1 to 6 would
be valid.*/
1 /* The priority within the gross levels; see chapter 10, any
value from 0 to 7 is ok */
);
}
in this program,I set the IRQ1 as level-sensitive,in my board,when I set the IRQ1 as low level(logic 0),the program can enter the "INTERRUPT(out_irq5_pin_isr, 0x2600 )",and when I set the IRQ1 as high level(logic 1) ,the program didn't jump out the "INTERRUPT(out_irq5_pin_isr, 0x2600 )",so what wrong in the program?
Additional,I am Chinese user,and my English is poor,please understanding
thank you very much!