I am using the Eport interrupts on a design, and I dont fully understand Priorities and Levels. I see in the Reference manual that they have a preset/Unchangeable Priority. but what about level? how does it all work together. how does level and priority relate to interrupt servicing?
This is easy. Imagine that the CPU is servicing an interrupt with level N. Then an interrupt request with level M activates. If M>N then the CPU will start processing the new interrupt, otherwise it will finish processing the first interrupt before starting to process the next. That's how levels work. Level 7 is special, the above doesn't apply to it. Now imagine that there are several pending interrupt requests with the same level. That's where priorities come in. The one with the highest priority will be serviced first, others will wait. Then if a new interrupt request activates with the same level and a higher priority, it will still wait. Unlike levels, priorities do not preempt each other. EPORT is special: it has a 'fixed midpoint priority' between 3 and 4. You can think of it as having priority 3.5. The interrupt level is still configurable, though.
Thank you, Georg, for correcting me. I wasn't too careful reading the manual. Of course, EPORT's interrupt level is not configurable. Looking into the manual for my MCU (MCF52233), I cannot see which level is used by EPORT.
Hi Wolf, there is a nice picture in the ref manual addendum for the 5275 showing the priority levels. But it states that the eport ints are of mid priority, but all with a different int level. Irq5 is level 5 and mid priority, Irq1 is level 1 and mid priority. They are not all allocated at level 3. Regards, Georg