| 
  |||||||||||
| 技術(shù)交流 | 電路欣賞 | 工控天地 | 數(shù)字廣電 | 通信技術(shù) | 電源技術(shù) | 測(cè)控之家 | EMC技術(shù) | ARM技術(shù) | EDA技術(shù) | PCB技術(shù) | 嵌入式系統(tǒng) 驅(qū)動(dòng)編程 | 集成電路 | 器件替換 | 模擬技術(shù) | 新手園地 | 單 片 機(jī) | DSP技術(shù) | MCU技術(shù) | IC 設(shè)計(jì) | IC 產(chǎn)業(yè) | CAN-bus/DeviceNe  | 
  
PXA255的中斷問(wèn)題 | 
  
| 作者:horny 欄目:ARM技術(shù) | 
在用ADS調(diào)試pxa255時(shí),乍樣設(shè)置都進(jìn)不了中斷,中斷開(kāi)了,也有中斷向量. 哪位大俠清楚pxa255的中斷處理流程,給講一下,看到好多代碼,跟別的ARM芯片好象不太一樣.  | 
  
| 2樓: | >>參與討論 | 
| 作者: horny 于 2005/8/10 20:40:00 發(fā)布:
         貧居鬧市無(wú)人問(wèn),我頂 貧居鬧市無(wú)人問(wèn),我頂  | 
  |
| 3樓: | >>參與討論 | 
| 作者: horny 于 2005/8/11 12:28:00 發(fā)布:
         代碼--自己寫(xiě)的喲 #define _DEFINING_XSINTCTRLAPI #include "string.h" #include "systypes.h" #include "dm_errors.h" #include "dm.h" #include "XsCp15.h" #include "XsIntCtrlApi.h" #include "XsIntCtrl.h" #include "platform.h" #include "cotulla.h" #include "DM_Debug.h" /* ******************************************************************************* ******************************************************************************* API functions ******************************************************************************* ******************************************************************************* */ /* ******************************************************************************* * * FUNCTION: XsIcSWInit * * DESCRIPTION: Init context structure and private tables. * * INPUT PARAMETERS: None * * RETURNS: None * * GLOBAL EFFECTS: None * * ASSUMPTIONS: DM ONLY uses IRQ, but owns that * * CALLS: * * CALLED BY: * * PROTOTYPE: UINT32 XsIcSWInit (void); * ******************************************************************************* */ void XsIcSWInit (void) { // Zero IRQ tables and context structure memset (&XsIcIrqHandlerTable[0], 0, sizeof(XsIcIrqHandlerTable)); memset (&XsIcIrqHandlerParamTable[0], 0, sizeof(XsIcIrqHandlerParamTable)); memset (&XsIntCtrlContext, 0, sizeof(XsIntCtrlContext)); } // End XsIcSWInit() /* ******************************************************************************* * * FUNCTION: XsIcHWSetup * * DESCRIPTION: Invoke xsIcInstallInterruptVectors() to give DM CONTROL of * the IRQ interrupts when they occur. (The FIQ is not used * by the DM, but treated as reserved for debug MONITOR use.) * Verify that there is already appropriate code INSTALLed * at the vector address and that no IRQ interrupts are * enabled (which would indicate that the DM does not "own" * the IRQ interrupt. * * INPUT PARAMETERS: None * * RETURNS: Success: 0 (ERR_NONE) * ERR_T_ALREADY_IN_USE: if any IRQ ints are mask-enabled. * ERR_T_NO_HANDLER: No appropriate code already located * at the IRQ vector address. * * GLOBAL EFFECTS: Logs detected errors * * ASSUMPTIONS: DM ONLY uses IRQ, but owns that * * CALLS: xsIcInstallInterruptVectors() * * CALLED BY: * * PROTOTYPE: UINT32 XsIcHWSetup (void); * ******************************************************************************* */ UINT32 XsIcHWSetup (void) { UINT32 status = ERR_NONE; UINT32 copyOfICLR = XsIntCtrlRegsP->ICLR; UINT32 copyOfICMR = XsIntCtrlRegsP->ICMR; // If any IRQ level interrupts are enabled, someone else is using them // and a basic assumption of the DM is violated. if ((~copyOfICLR) & (copyOfICMR)) // IRQ level if bit clear in ICLR. { status = ERR_T_ALREADY_IN_USE; } else { // IRQ vector seems to be available. Now try to INSTALL our handler. status = XsIcInstallInterruptVectors(); } if (ERR_NONE == status) { XsIntCtrlContext.hwInitSucceeded = TRUE; // Safe to turn on application interrupts now. XsIcEnableInterruptsIrq(); IRQ_EnableInterrupts (CPSR_I_Bit|CPSR_F_Bit); } else { LOGERROR (XsIntCtrlContext.loggedError, ERR_L_XSIC, ERR_S_XSIC_HWSETUP, status, 0, 0, 0) } return (status); } // End XsIcHWSetup () /* ******************************************************************************* * * FUNCTION: XsIcRegisterHandler * * DESCRIPTION: Record, for the specified first level interrupt signal, * a handler and parameter to be passed to that handler. * The handler will be invoked with that parameter when * an IRQ occurs with the specified signal being mask-enabled * and active. * * Typical users: main DMA or GPIO driver, but not users * of those drivers. * * INPUT PARAMETERS: sourceID: Iden  | 
  |
  | 
    
 
  | 
  
| 免費(fèi)注冊(cè)為維庫(kù)電子開(kāi)發(fā)網(wǎng)會(huì)員,參與電子工程師社區(qū)討論,點(diǎn)此進(jìn)入 | 
Copyright © 1998-2006 www.udpf.com.cn 浙ICP證030469號(hào)  |