I actually just posted this question to Xilinx forum, so I feel guilty about double-posting; it's just that Xilinx support responsiveness has gone to sh*t at about the time they stopped taking webcase. I thought highly of Xilinx support before, but I think they are now on-par with or perhaps worse than Altera. On the contrary, this forum is much better, so I am trying my luck here--please pardon me.
I just got a A9 private timer interrupt working on a Zedboard, based on the example code generated from the BSP documentation page. There are couple of parts that do NOT make sense to me. If will explain how I think it works (apparently, it does); if someone can point out where my understand is incomplete/wrong, I'd appreciate it.
The GIC is quite configurable, and can handle 96 independent interrupt sources identified with an interrupt ID. The private timer interrupt, for example is 29. I read this in the SCU private timer section of the Zynq TRM. But the TRM does not have a table of all 96 interrupt sources; so I find that I have to read the TRM carefully to tease out the IDs. The global timer ID seems to be 27, based on the explanation of the Global_Timer_Control_Register. Likewise, the watchdog is ID 30.
Is the lack of a definitive interrupt ID table because Zynq allows the SW to set the interrupt ID of different sources? If so, how does one do that? Or is this just baked into the HW in Vivado?
Next: I do NOT understand the interrupt priority. The purpose of ICCPMR (8 bit) is to shielf the processor from uninteresting interrupts. Since ICDIP[23:0] is 3 bytes, it suggests that I can change the priority of each of the 96 interrupts. But the XSDK generated example is unclear. It sets the ICCPMR t0 0xF0, but does NOT set the ICDIP register, which would mean that the PoR priority of private timer interrupt (ID 29) is greater than 0xF0--contrary to the TRM (which says it is 0). Like I said, the example works; I just don't understand how it works. At the moment, I could not even think of a reason for not leaving the ICCPMR at the PoR setting (0)--the example still works.
Thank you very much for reading (and hopefully answering) my question.