MicroZed Chronicles リスト http://adiuvoengineering.com/?page_id=285
@ Adam Taylor blog
https://forums.xilinx.com/t5/Xcell-Daily-Blog/Introduction-to-the-Zynq-Triple-Timer-Counter-Part-Three-Adam/ba-p/413105
There are several interrupts to choose from for each TTC. I have enabled only the interval interrupt in this instance:
XTtcPs_EnableInterrupts(TtcPsInt, XTTCPS_IXR_INTERVAL_MASK);
The file xttcps_hw.h, which is called up by xttcps.h, includes definitions for all possible TTC interrupts allowing them to be enabled as desired using the above function.
ソースコードでISRを設定しているのは以下の通り
XScuGic_Connect(GicInstancePtr, TTC_INTR_ID,
(Xil_ExceptionHandler)TickHandler, (void *)TtcPsInt);
上記でコネクトしているTickHandlerは以下のような実装をしている
static void TickHandler(void *CallBackRef)
{
u32 StatusEvent;
StatusEvent = XTtcPs_GetInterruptStatus((XTtcPs *)CallBackRef);
XTtcPs_ClearInterruptStatus((XTtcPs *)CallBackRef, StatusEvent);
printf("event\n\r");
}