Kunal
The details about the fixed priorities / levels were never absolutely clear for from the manual - (although I have to admit that the if it is read with emphasis on the "level
's" ) it is probably exact.
I just did a test since I have to admit that I was also not absolutely sure (I tested on the M52211 but I think that there will be no difference to any others). While testing I found that my interface routine previously supported setting a level but I had removed this about a year ago (presumably I was convinced then that the levels are fixed and can not be changed).
These are my findings:
1. The ICR control registers (ICR1..ICR7) in interrupt controller 0 are initialised at reset with the values 0x08, 0x10, 0x18...0x38 (LEVEL1..LEVEL7), priority reads back 0 but this is also expained in the manual that this reads 000b, although it is fixed at midpoint priority. The manual doesn't inform about the initialisation values (
actually they are probably not initilised at reset but are fixed, but this is effectively the same).
2. The debugger doesn't let you change these values.
3. The program also can not change these values - these 7 registers are therefore read only! There is no access error when trying to writethem though.
4. When the interrupts arrive, the SR is set with the interrupt level mask according to the initialised values (IRQ1 = 1, ...IRQ7 = 7).
Therefore my remark about being able to set the level is wrong. They are really pre-defined and fixed (level and priority).
Note that some devices have 15 edge ports. I believe that the IRQ8..IRQ15 can be assigned any level and priority.
Regards
Mark
Message Edited by mjbcswitzerland on
2008-09-17 03:23 PM