adamTaylor
XADC
Alarm
#migrated

Zybo > Chronicles blog 43 > XADC Alarms and Interrupts > Alarmの有効化 / 割込みEnable

More than 1 year has passed since last update.

MicroZed Chronicles リスト http://adiuvoengineering.com/?page_id=285

@ Adam Taylor blog

https://forums.xilinx.com/t5/Xcell-Daily-Blog/Adam-Taylor-s-MicroZed-Chronicles-Part-43-XADC-Alarms-and/ba-p/496468


The XADC provides a number of alarm output signals that can be connected to other logic modules implemented in the Zynq SoC’s PL (programmable logic). These logic modules can initiate an action should an alarm occur. They can also drive external indicators—LEDs for instance—which could be located on a front panel to show equipment status.


TRMのTable 30-1に7つのALM[]項目とOTが記載されている。


These alarms (there are seven in total, see the table from TRM above) can be enabled using the function call with the appropriate mask, as supplied by xadcps_hw.h. If more than one alarm is required, then OR them together.


XAdcPs_SetAlarmEnables(XADCInstPtr, XADCPS_CFR1_ALM_TEMP_MASK);


Once we’ve enabled the alarm, we enable the interrupt as well using the appropriate function call, again using the masks provided by xadcps_hw.h. To enable more than one interrupt at a time, OR them together:


XAdcPs_IntrEnable(XADCInstPtr,XADCPS_INTX_ALM0_MASK);