Jump to content
  • 0

AXI Interrup Controller setup


Edocecrous

Question

Hello,

I checked the tutorials and read the pdf-s on the AXI Interrupt controller. However, i could use come clarification about a couple of things.

In Microblaze advanced configuration there's an option to set interrupts to NONE/NORMAL/FAST, or leave it in AUTO mode.
Is this setting linked to the AXI interrupt controller creation process? I mean if it run Block Automation, and enable Interrupt Controller, then
AXI Interrupt Controller IP is created, but the setting doesn't change in the microblaze settings (for example it stays AUTO/NONE).

Does that mean if i want a normal mode interrup controller setup, then i have to set it to normal in the AXI Interrupt Controller, also in the microblaze settings?

What are the differences between FAST and NORMAL mode? Docu states: "In this mode, AXI INTC provides the interrupt vector address using the interrupt_address signal, and the processor acknowledges an interrupt through the processor_ack signal."
Does that mean that if i have it in NORMAL mode, then it will not send the vector to the processor, and those lines doesn't need to be connected?

Does the Interrupt interface on the microblaze and the AXI Interrupt Controller have to be connected in both NORMAL and FAST mode?
If not, they communicate over AXI?

If i have a timer that is the only interrupt source in my design, and i want a callback function to be called every time the timer sends an interrupt, how can i implement this with the simplest AXI INTC? Can i do this in normal mode?

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

>Does the Interrupt interface on the microblaze and the AXI Interrupt Controller have to be connected in both NORMAL and FAST mode?

The microblaze supports vectored interrupt table when FAST mode is enabled.  This allows the ISR to jump to a function.  For example, if your familiar with ARM Cortex-M, FAST mode in the microblaze is the same idea.  In a general processor there is only one interrupt for general interrupts, i.e. serial, etc. So the software has to decode the interrupt and then jump to the handle, this is NORMAL mode.

I would recommend adding a AXI UART (connect to concat to ISR) and AXI TIMER connect the interrupt concat) in vivado.  Then use vitis to create a platform and example app.  The platform will provide the drivers, etc.  Typically the drivers have an init function, like the gpio, that will connect to the interrupt etc and you provide a callback.  vitis has all the driver support for most AXI devices.

I would recommend using FAST, which is the default for the fastest ISR speed. 

https://www.xilinx.com/html_docs/xilinx2020_1/vitis_doc/ugx1574145792115.html

https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18841745/Baremetal+Drivers+and+Libraries

 

Link to comment
Share on other sites

Hi,

I made it work in normal mode, concat receiving 2 sources (timer and gpio), and going into the interrupt controller.
Now i want to change to FAST mode, so i changed both the microblaze and the interrupt controller to fast mode, run connection automat, and it hooked up the clock and the reset to the interrupt controller. I also generated new code in vitis, but i can't see any change in the generated software...

The timer still has both the
           XTmrCtr_SetHandler(&TimerCounter, TimerCounterHandler, &TimerCounter);    //Setup the handler for the timer counter

and the connect, and it hooks in the XTmrCtr_InterruptHandler
           Status = XIntc_Connect(&intc, XPAR_MICROBLAZE_0_AXI_INTC_AXI_TIMER_0_INTERRUPT_INTR, (XInterruptHandler)XTmrCtr_InterruptHandler, (void *)&TimerCounter);

i thought if i switch to fast mode there will be a direct XIntc_Connect to the &TimerCounter.

Am i misunderstanding something? (i wish there were pure assembly examples, C is not my favourite)

 

Link to comment
Share on other sites

I think this better answers your question:

https://forums.xilinx.com/t5/General-Technical-Discussion/Microblaze-Fast-interrupt-Issue/td-p/276268

Also take a look at XilinxProcessorIPLib/drivers/tmrctr_v4_5/examples/xtmrctr_fast_intr_example.c

Some other info: look at xintc_g.c, this file is generated by the Vitis tool set and creates the table you are looking for.  This table is the address for the vector your configuring via the XIntc_ConnectFastHandler.  FYI, there are several examples in Vitis, just grep the vitis 2020.1 with fast_interrupt

Also, you are not using FreeRTOS, correct. I was going to see if I can make that work. 

 

Link to comment
Share on other sites

Hi,

I was told if i just add some interrupt sources and generate the code with vitis it will by default generate the code for fast interrupts. I tried many different ways to build the system, left it on auto, or manually set the processor to FAST interrupts, the generated code not once included XIntc_ConnectFastHandler()...
The design evaluates to be ok, and both the axi intc and the processor is set up for fast interrupts, and the reset and clk is connected, so i believe the HW is set up correctly.
 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...