ECT 358. Lecture 25 Interrupts. The best way to forget your own problems is to help someone solve his. Look not every man on his own things, but every man also on the things of others. Phillippians 2:4. Interrupts. MicroBlaze has one interrupt port.
Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.
Look not every man on his own things, but every man also on the things of others. Phillippians 2:4
port Interrupt = interrupt
port CaptureTrig0 = net_gnd
Delete references to other interrupt controller
parameter INT_HANDLER = timer_int_handler, INT_PORT = Interrupt
timer_int_handler is the name of your interrupt service routine.
Delete references to other interrupt controller.
You can write your own interrupt handlers, or ISRs, for any peripherals that raise interrupts. You write these routines in C as with other functions. You can give the interrupt handler function any name with the signature void func (void *). Alternately, you can elect to register the handlers defined as a part of the drivers of the interrupt sources.
void timer_int_handler(void * baseaddr_p)
status = XTmrCtr_mGetControlStatusReg(baseaddr_p, 0);
if (status & XTC_CSR_INT_OCCURED_MASK)
/* your code here */
/* Clear the timer interrupt */
XTmrCtr_mSetControlStatusReg(baseaddr_p, 0, status);
/* initializations */
XTmrCtr_mSetLoadReg(XPAR_OPB_TIMER_1_BASEADDR, 0, 1000000);
/* reset the timers, and clear interrupts */
XTC_CSR_INT_OCCURED_MASK | XTC_CSR_LOAD_MASK );
/* start the timers */
XTC_CSR_ENABLE_TMR_MASK | XTC_CSR_ENABLE_INT_MASK |
XTC_CSR_AUTO_RELOAD_MASK | XTC_CSR_DOWN_COUNT_MASK);
/* Wait for interrupts to occur */