Page 1 of 2

Problems using EPORT IRQ5 and IRQ7 on MOD5270

Posted: Tue Dec 16, 2008 1:14 am
by matthew.hutchins
Hi,

We are developing a Netburner application for the MOD5270 that requires 4 external hardware interrupt signals.

I have been developing using just two on EPORT pins IRQ1 and IRQ3 and everything works OK.

When I try to run the same code using IRQ5 and/or IRQ7, whenever an interrupt is generated the system locks up totally and must be restarted.

Does anybody know if these pins are treated differently, and if so, what must be done to use them?

The "MOD5270 Interrupts Application Note" suggests that somehow IRQ5 is used by the O/S but can also be used by user code without conflict, but doesn't say how.

Also, the content of the EPORT EPPAR register when I first see it is 0xCC00 == 1100110000000000 which suggests that interrupts 5 and 7 are already in use.

Thanks

Matthew Hutchins

Re: Problems using EPORT IRQ5 and IRQ7 on MOD5270

Posted: Tue Dec 16, 2008 1:34 am
by matthew.hutchins
Oops, that stuff about the EPORT EPPAR register is wrong, it is actually 0 at startup as expected.

But the rest of the question still stands. Is there a trick to using IRQ5 and IRQ7?

Thanks

Matthew

Re: Problems using EPORT IRQ5 and IRQ7 on MOD5270

Posted: Tue Dec 16, 2008 5:29 am
by Ridgeglider
See the appnote and zipped code examples at http://www.netburner.com/downloads/mod5 ... rrupts.zip
IRQ7 is an unmasked NMI, and requires different setup.
Even if something (other than the EPORT, which would use the same vector)) is using IRQ5, you should be able to add another ISR at level 5 by varying the priority.

Re: Problems using EPORT IRQ5 and IRQ7 on MOD5270

Posted: Tue Dec 16, 2008 3:19 pm
by matthew.hutchins
Thanks.

The thing I had misunderstood was the lack of difference between pin number and interupt level. I had thought that these were two independent things, however it seems that EPORT pin n is hardwired to interrupt level n. That means pin 5 is a level 5 interrupt and pin 7 is a level 7 interrupt.

Matthew

Re: Problems using EPORT IRQ5 and IRQ7 on MOD5270

Posted: Tue Dec 16, 2008 3:32 pm
by lgitlitz
Yes, the IRQ pins are hardwired to their corresponding interrupt levels. The interrupt priority on the IRQ pins is also hardwired to a priority level between priority 3 and 4.

Re: Problems using EPORT IRQ5 and IRQ7 on MOD5270

Posted: Tue Dec 16, 2008 3:49 pm
by Ridgeglider
Larry: can you explain what it means for the priority to be "between 3 and 4". I could never quite get that... It seems like it could be 3, or 4, but "between"?

Thanks

Re: Problems using EPORT IRQ5 and IRQ7 on MOD5270

Posted: Tue Dec 16, 2008 4:18 pm
by lgitlitz
Basically there are 8 programmable priorities, 0-7. The IRQ lines have a fixed, non-programmable priority which is called the fixed midpoint priority. This priority is greater the 3 but less then 4. Priorities only have significance if two interrupts with the same level are registered on the same clock cycle. Then the interrupt with the highest priority will run first. The most important thing about priorities is that they are all unique for any given level or the processor will have strange errors or lockups.

Re: Problems using EPORT IRQ5 and IRQ7 on MOD5270

Posted: Mon Aug 30, 2010 3:00 am
by yevgenit
My application uses IRQ5, IRQ3, and IRQ1 pins as the external interrupt sources using NB INTERRUPT macro. No problem with IRQ5 is detected.
Ridgeglider wrote: Even if something (other than the EPORT, which would use the same vector)) is using IRQ5, you should be able to add another ISR at level 5 by varying the priority.

Re: Problems using EPORT IRQ5 and IRQ7 on MOD5270

Posted: Mon Aug 30, 2010 3:45 am
by yevgenit
From Freescale forum by taigbr (http://forums.freescale.com/t5/68K-Cold ... 6031#M5324):

"There is a nice table explaining level and priority in the 5275 manual addendum:
http://www.freescale.com/files/32bit/do ... pdf?fpsp=1"

Unfortunately, this table isn't mentioned in Freescale 5270/5271 documentation.

Re: Problems using EPORT IRQ5 and IRQ7 on MOD5270

Posted: Tue Aug 31, 2010 8:52 am
by bbracken
I was attempting to use two IRQs (1 and 3) on a FreeScale MCF52259 (not a NB). FreeScale support has basically told me that you cannot use the EdgePort module and expect more than 1 of the IRQ signals to be used as interrupts. I've have verified on a logic analyzer that if for example, you are servicing IRQ3 and IRQ1 occurs, IRQ1 is lost. Both IRQs will interrupt as long as there is no overlap between the two.

Maybe NB can weigh in on this with any information they have.

bb