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.