中斷優(yōu)先級(jí)
AXI Interrupt Controller支持中斷優(yōu)先級(jí)。 在Vivado Block Design中, bit-0連接的中斷優(yōu)先級(jí)最高, 越靠近bit-0的中斷優(yōu)先級(jí)最高。

AXI Interrupt Controller的手冊(cè)pg099中的描述如下:
Priority between interrupt requests is determined by vector position. The least significant bit (LSB, in this case bit 0) has the highest priority.
Intr(0) is always the highest priority interrupt and each successive bit to the left has a corresponding lower interrupt priority.
中斷嵌套
要使用中斷優(yōu)先級(jí),通常也要使能中斷嵌套(Nested Interrupts)。在Vivado Block Design中, 配置AXI Interrupt Controller時(shí),在“advanced”選項(xiàng)中,要選擇“Interrupt Level Register” 。

AXI Interrupt Controller的手冊(cè)pg099中的描述如下:
Nested Interrupts
The core provides support for nested interrupts, by implementing an Interrupt Level
Register. This can be used by software to prevent lower priority interrupts from occurring
when handling an interrupt, thus allowing interrupts to be enabled during interrupt
handling to immediately take a higher priority interrupt. Software must save and restore
the Interrupt Level Register and return address.
Because the processor jumps directly to the unique Interrupt vector address to service a
particular interrupt when using fast interrupt mode, the user interrupt service routine code itself must save and restore the Interrupt Level Register and Return Address in this case. In
normal interrupt mode, this is handled by the software driver.
選擇“Interrupt Level Register” 后,中斷處理代碼會(huì)保存和恢復(fù)r14,并且在進(jìn)入設(shè)備的ISR之前會(huì)使能中斷。 具體代碼請(qǐng)查看XIntc_DeviceInterruptHandler( )。
Xintc.h中的說(shuō)明如下:
For nested interrupts, XIntc_DeviceInterruptHandler saves
microblaze r14 register on entry and restores on exit. This is
required since compiler does not support nesting. It enables
Microblaze interrupts after blocking further interrupts from
the current interrupt number and interrupts below current
interrupt priority by writing to Interrupt Level Register of
INTC on entry. On exit, it disables microblaze interrupts and
restores ILR register default value(0xFFFFFFFF)back. It is
recommended to increase STACK_SIZE in linker script for nested
interrupts.
本文轉(zhuǎn)載自:博客園
審核編輯:湯梓紅
-
amd
+關(guān)注
關(guān)注
25文章
5647瀏覽量
139026 -
Xilinx
+關(guān)注
關(guān)注
73文章
2192瀏覽量
129938 -
中斷
+關(guān)注
關(guān)注
5文章
912瀏覽量
43565 -
AXI
+關(guān)注
關(guān)注
1文章
143瀏覽量
17791
發(fā)布評(píng)論請(qǐng)先 登錄
stm32的中斷優(yōu)先級(jí)基本原理介紹
STM32中斷使用NVIC中斷優(yōu)先級(jí)管理
STM32F10X的中斷優(yōu)先級(jí)
STM32中斷優(yōu)先級(jí)和開(kāi)關(guān)總中斷教程
DSP中斷如何設(shè)置優(yōu)先級(jí)
如何設(shè)置51單片機(jī)的中斷優(yōu)先級(jí)
51單片機(jī)的中斷優(yōu)先級(jí)是怎么樣的及中斷嵌套的資料說(shuō)明
2.FreeRTOS中斷優(yōu)先級(jí)和任務(wù)優(yōu)先級(jí)
STM32筆記之中斷優(yōu)先級(jí)和開(kāi)關(guān)總中斷
STM8S105硬件中斷映射表和軟件中斷優(yōu)先級(jí)位
中斷優(yōu)先級(jí)處理的原則及配置 搶占優(yōu)先級(jí)和響應(yīng)優(yōu)先級(jí)的區(qū)別

AMD Xilinx AXI Interrupt Controller中斷優(yōu)先級(jí)
評(píng)論