0

I am trying to get a software interrupt running in a microblaze but am hitting a complete road block. So the xparameter.h file that gets generated by the Vivado design does not have any generated macros for the sw interrupts I enabled.

So I started looking at hitting the interrupt module registers. From the datasheet I can see that base_addr+0x0 is the ISR and base_addr+0x8 is the IER. And then there is the IVAR.

I have done the following in code.

void
software_test( void * args )
{
   uint32_t * isr = (uint32_t * ) XPAR_MICROBLAZE_0_AXI_INTC_BASEADDR;
   isr[0xC/4] = 0x20;
   xil_printf("software test\r\n");
}

int init()
{
   uint32_t * isr = (uint32_t * ) XPAR_MICROBLAZE_0_AXI_INTC_BASEADDR;
   isr[0x114/0x4] = (unsigned)&software_test;

   isr[0x8/0x4] |= 0xFFFFFFF0; /* trying to enable everything */
}

And then to start the interrupt I am trying to hit ISR register

uint32_t * isr = (uint32_t * ) XPAR_MICROBLAZE_0_AXI_INTC_BASEADDR;
isr[0x0/4] = 0x20;

Any help would be greatly appreciated.

Godspped
  • 683
  • 4
  • 12
  • 31
  • you might want to read the manual: `http://www.xilinx.com/support/documentation/sw_manuals/xilinx11/mb_ref_guide.pdf` which discusses the possible interrupt sources, I suspect you should look at the `software break` interrupt and how it is initiated and the proper code for handling it. – user3629249 Sep 22 '16 at 16:19
  • I am using the INTC module and the fast interrupt method mentioned in there. I have read this document, and thought of the software break, but I am confused as to why I cant get the software interrupt working as it is hinted everywhere in the INTC document that it should work. – Godspped Sep 24 '16 at 00:11

0 Answers0