- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
i test the different Interrupts. Setting an software flag and execute the assigned ISR works.
Now i try to get an interrupt triggered with an input pin on the Evaluationboard MPC57xxxMB + MPC5777C (i just use Core0):
Initialization for IRQ0:
xcptn_xmpl (); /* Configure and Enable Interrupts */
SIU.PCR[IRQ0_pin].R = PA_IRQ | IBE; /* Input pin PCR450: Mode alternative 1 = IRQ0, input buffer enable */
SIU.DIRER.B.EIRE0 = 1; /* enable external interrupt on IRQ0 */
SIU.IREER.B.IREE0 = 1; /* Interrupt on rising edge */
SIU.EIISR.B.ESEL0 = 0; /* input = external interrupt*/
SIU.DIRSR.B.DIRS0 = 0; /* Interrupt request for event on IRQ0 */
INTC.PSR[46].R = PROCESSOR0 | PRIO; /* Interrupt to Core0, Prio 15 */
Main: [...]
ISR:
void IRQ0_ISR(void)
{
ctr++;
//Clear Flag:
SIU.EISR.B.EIF0 = 1;
//INTC.SSCIR[46].B.CLRn = 1;
}
ISR vector File:
void IRQ0_ISR(void);
[...]
(uint32_t) &IRQ0_ISR, /* Vector # 46 SIU_EIISR[EIF0] SIU SIU External Interrupt Flag 0 */
(uint32_t) &dummy, /* Vector # 47 SIU_EIISR[EIF1] SIU SIU External Interrupt Flag 1 */
(uint32_t) &dummy, /* Vector # 48 SIU_EIISR[EIF2] SIU SIU External Interrupt Flag 2 */
(uint32_t) &dummy, /* Vector # 49 SIU_EIISR[EIF3] SIU SIU External Interrupt Flag 3 */
(uint32_t) &dummy, /* Vector # 50 SIU_EIISR[EIF15:EIF4] SIU SIU External Interrupt Flags 15-4 */
I hope the Code is understandable, here are my questions because it doesnt work:
- is the correct vector assigned
- do i miss a register in initialization
- which flag trigger the ISR and is to be cleared: the one in INTC or in SIU.EISR
- do IRQ4-15 trigger the same Interrupt (in SIU.EISR are 15 flags but in INTC just 5 for IRQ)
I used the MPC5748G-SW2-extInterrupt example as reference, if you have some recommendations for simple PWM and Timer examples you would help me in advance!
Florens
Solved! Go to Solution.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, you are missing SIU_A IMUX3 register setting.
I will share example code early.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I've just published simple working example for this here:


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, you are missing SIU_A IMUX3 register setting.
I will share example code early.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You are right David.
I added: "SIU.IMUX3.B.MUXSEL0 = 0b01;" in the IRQ Initialization part and it works as intended.
Thanks alot for the example.
