Xilinx MicroBlaze Reference Manual page 122

Hide thumbs Also See for MicroBlaze:
Table of Contents

Advertisement

/*
* Start the interrupt controller such that interrupts are enabled for
* all devices that cause interrupts, specifying real mode so that the
* timer counter can cause interrupts thru the interrupt controller.
*/
Status = XIntc_Start(&InterruptController, XIN_REAL_MODE);
if (Status != XST_SUCCESS) {
return XST_FAILURE;
}
/*
* Setup the handler for the timer counter that will be called from the
* interrupt context when the timer expires, specify a pointer to the
* timer counter driver instance as the callback reference so the
* handler is able to access the instance data
*/
XTmrCtr_SetHandler(&TimerCounterInst, MicroBlazeScrubHandler,
/*
* Enable the interrupt of the timer counter so interrupts will occur
* and use auto reload mode such that the timer counter will reload
* itself automatically and continue repeatedly, without this option
* it would expire once only
*/
XTmrCtr_SetOptions(&TimerCounterInst, TIMER_CNTR_0,
XTC_INT_MODE_OPTION | XTC_AUTO_RELOAD_OPTION);
/*
* Set a reset value for the timer counter such that it will expire
* earlier than letting it roll over from 0, the reset value is loaded
* into the timer counter when it is started
*/
XTmrCtr_SetResetValue(TmrCtrInstancePtr,TmrCtrNumber,SCRUB_PERIOD);
/*
* Start the timer counter such that it's incrementing by default,
* then wait for it to timeout a number of times
*/
XTmrCtr_Start(&TimerCounterInst, TIMER_CNTR_0);
...
}
See the section
how to calculate the scrubbing rate.
BRAM Driver
The standalone BSP BRAM driver is used to access the ECC registers in the LMB BRAM
Interface Controller, and also provides a comprehensive self test.
By implementing the SDK Xilinx C Project "Peripheral Tests", a self-test example including
the BRAM self test for each LMB BRAM Interface Controller in the system is generated.
Depending on the ECC features enabled in the LMB BRAM Interface Controller, this code will
MicroBlaze Processor Reference Guide
UG984 (v2018.2) June 21, 2018
&TimerCounterInst);
Scrubbing
for further details on how scrubbing is implemented, including
www.xilinx.com
Chapter 2: MicroBlaze Architecture
Send Feedback
122

Advertisement

Table of Contents
loading

Table of Contents