最新免费av在线观看,亚洲综合一区成人在线,中文字幕精品无码一区二区三区,中文人妻av高清一区二区,中文字幕乱偷无码av先锋

登錄 免費注冊 首頁 | 行業(yè)黑名單 | 幫助
維庫電子市場網(wǎng)
技術(shù)交流 | 電路欣賞 | 工控天地 | 數(shù)字廣電 | 通信技術(shù) | 電源技術(shù) | 測控之家 | EMC技術(shù) | ARM技術(shù) | EDA技術(shù) | PCB技術(shù) | 嵌入式系統(tǒng)
驅(qū)動編程 | 集成電路 | 器件替換 | 模擬技術(shù) | 新手園地 | 單 片 機 | DSP技術(shù) | MCU技術(shù) | IC 設(shè)計 | IC 產(chǎn)業(yè) | CAN-bus/DeviceNe

中斷得點問題!~

作者:hpqhpq 欄目:DSP技術(shù)
中斷得點問題!~
最近用得是BF533,調(diào)了下串口,用得是查詢模式,還好是通過了,可是想用中斷得時候才發(fā)現(xiàn)問題:中斷應(yīng)該設(shè)在“軟件中斷下”么?看了半天也沒弄懂!~~~~(用得不是DMA模式)

2樓: >>參與討論
pengpwn
回復(fù)
為什么不用DMA呢?這樣會方便很多。∈鼓芟鄳(yīng)DMA中斷就可以了!

3樓: >>參與討論
hardfire
翻譯
Blackfin的 Event Controller響應(yīng)處理下列5類事件:
1. Emulation
2. Reset
3. Non-maskable interrupts (NMI)
4. Exceptions
5. Interrupts(共11個IVG)
可見,Exceptions不等于Interrupts,Exceptions是軟件自己產(chǎn)生的,是同步于SOFTWARE flow的,而Interrupts則是異步于軟件流程的。
處理event,由兩個模塊構(gòu)成:SIC+CEC,它們的相互關(guān)系看Figure 4-5. Interrupt Processing Block Diagram,非常清晰。

The SIC provides mapping between the many peripheral interrupt sources and the prioritized general

-purpose interrupt inputs of the core. This mapping is programmable, and individual interrupt sources can be masked in the SIC.
這段話說明各個peripherals對應(yīng)的中斷是可更改的,不是固定的。
CEC管理IVG7-IVG15這9個general-purpose中斷,相對的是dedicated的(綁定的,固定的)中斷和exception.而

一般的IVG14/15兩個最低優(yōu)先級的保留給軟件中斷(SOFTWARE interrupts).
Table 4-6. SYSTEM and Core Event Mapping這個對應(yīng)表P178非常重要。
所有的用16個PF產(chǎn)生的中斷統(tǒng)一用兩個PF Interrupt A/B來管理,占用IVG12,分別占用兩個IRQ號26和27。

PF Interrupt A      IVG12   26
PF Interrupt B      IVG12   27

整個中斷處理流程看P180,描述得非常清晰。
注意:
1)SIC_IARx負責(zé)把多個peripherals的中斷映射到有限的核心能處理的IVG7-13 event上,參見Table 4-8. IVG-Select Definitions,P192,默認的mapping可看這幾個SIC_IARn的復(fù)位后默認設(shè)置,即看Reset的數(shù)值。一般用戶不要修改這個默認的mapping關(guān)系,所以,這個SIC_IARx是不需要軟件設(shè)置和修改的。
2)IMASK則負責(zé)mask off/enable不同的IVGs
3)When the interrupt service routine for Interrupt A has been executed,
the RTI instruction clears the appropriate IPEND bit.
However, the relevant SIC_ISR bit is not cleared unless the interrupt
service routine clears the mechanism that generated Interrupt
A, or if the PROCESS of servicing the interrupt clears this bit.
這里看出,IPEND位是進入ISR后自動清除的,但SIC_ISR里面的bit則是需要ISR代碼里面人為清除的(usually by writing a SYSTEM MMR)???。
(SIC_ISR)The bit is set when the SIC detects the interrupt is asserted and cleared when the SIC detects that the peripheral interrupt input has been deasserted.
看這段話,好像這個SIC_ISR里面的bit也是會自動清除的?

SIC_ISR寄存器是只讀的,對它寫入完全無效。

通常會有多個SIC中斷公用一個CEC的IVG event的情況,這就需要ISR里面通過讀取SIC_ISR寄存器的各個bit來進行人為的判斷了。

CEC的是三個寄存器:
1.IMASK - interrupt mask
2.ILAT - interrupt latch
3.IPEND - interrupts pending, 順序是:ILAT bit被清除IPEND被set.

BF CORE有一個16 entry的硬件的Event Vector Table(EVT),
Table 4-9. Core Event Vector Table有詳細描述。
就是說,BF在它的CPU寄存器MMR里面(0xFFE0 2000~0xFFE0 203C)提供了16個32位的寄存器用來保存16個CORE Event的ISR的地址,這樣就不像其它的CPU,需要從中斷向量表里面做長跳轉(zhuǎn)到ISR入口,可提高中斷響應(yīng)速度

關(guān)于UART中斷,查看:
vim uClinux-dist/linux-2.6.x/include/asm/mach-bf533/irq.h
#define IRQ_UART_RX             21      /*DMA6 Interrupt (UART RX) */
#define IRQ_UART_TX             22      /*DMA7 Interrupt (UART TX) */
看CPU manual 13-16的Non-DMA Mode跟DMA Mode,不用DMA就是IRQ_UART_RX/TX,用DMA就是DMA6/7。



* - 本貼最后修改時間:2007-1-10 11:51:42 修改者:hardfire

4樓: >>參與討論
hpqhpq
謝謝上面得兩位哈!~我先試試
 
5樓: >>參與討論
hardfire
這個沒用中斷啊。
 
6樓: >>參與討論
hpqhpq
用了得,都寫道一起了哈~~~~~~
 
參與討論
昵稱:
討論內(nèi)容:
 
 
相關(guān)帖子
請各位幫幫忙~~
uClinux中是怎樣使用ADI提供的系統(tǒng)調(diào)用和驅(qū)動的?
help nfs
請問DSP與ARM相比的優(yōu)勢是什么?
求助關(guān)于HHBF531-R1
免費注冊為維庫電子開發(fā)網(wǎng)會員,參與電子工程師社區(qū)討論,點此進入


Copyright © 1998-2006 www.udpf.com.cn 浙ICP證030469號