LoginSignup
0
1

More than 5 years have passed since last update.

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

Last updated at Posted at 2016-06-12

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

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の実装

blogにソースがある

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1