Problems using EPORT IRQ5 and IRQ7 on MOD5270
-
- Posts: 9
- Joined: Mon Dec 15, 2008 11:05 pm
Problems using EPORT IRQ5 and IRQ7 on MOD5270
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
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
-
- Posts: 9
- Joined: Mon Dec 15, 2008 11:05 pm
Re: Problems using EPORT IRQ5 and IRQ7 on MOD5270
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
But the rest of the question still stands. Is there a trick to using IRQ5 and IRQ7?
Thanks
Matthew
-
- Posts: 513
- Joined: Sat Apr 26, 2008 7:14 am
Re: Problems using EPORT IRQ5 and IRQ7 on MOD5270
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.
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.
-
- Posts: 9
- Joined: Mon Dec 15, 2008 11:05 pm
Re: Problems using EPORT IRQ5 and IRQ7 on MOD5270
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
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
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.
-
- Posts: 513
- Joined: Sat Apr 26, 2008 7:14 am
Re: Problems using EPORT IRQ5 and IRQ7 on MOD5270
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
Thanks
Re: Problems using EPORT IRQ5 and IRQ7 on MOD5270
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
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.
Last edited by yevgenit on Tue Aug 31, 2010 11:23 am, edited 1 time in total.
Yevgeni Tunik
Embedded/RealTime software engineer
https://www.linkedin.com/in/yevgenitunik/
________________________
Embedded/RealTime software engineer
https://www.linkedin.com/in/yevgenitunik/
________________________
Re: Problems using EPORT IRQ5 and IRQ7 on MOD5270
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.
"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.
Yevgeni Tunik
Embedded/RealTime software engineer
https://www.linkedin.com/in/yevgenitunik/
________________________
Embedded/RealTime software engineer
https://www.linkedin.com/in/yevgenitunik/
________________________
Re: Problems using EPORT IRQ5 and IRQ7 on MOD5270
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
Maybe NB can weigh in on this with any information they have.
bb