Edited at

Zybo > Chronicles blog 43 > XADC > Alarm使用コード > GIC設定 / XADCの割込み設定 / ISRの実装

More than 1 year has passed since last update.

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

@ Adam Taylor blog


I have attached the code to this blog post. It is split into three functions:

  1. The first part configures the generic interrupt controller on the Zynq SoC so that we can use the XADC interrupt as part of this the interrupt service routine. It is called when the XADC interrupt is issued.

  2. The second part configures the XADC, sets the sequencer to a safe mode, and disables all alarms before reading the temperature. It then assigns an upper and lower temperature alarm based upon the value it has just read. Having set these values the function then sets the temperature alarm and enables the temperature interrupt.

  3. The third part is the interrupt service routine that will be called when the temperature interrupt occurs. This routine will clear the interrupt status register, disable more interrupts from occurring, and read the temperature at which the interrupt occurred. The temperature reading might not be above the interrupt temperature as it will fluctuate and we do not have the temperature averaging turned on. However, the value should be close.

  • GICの設定

  • XADCの割込み設定

  • ISRの実装