各位工程师,我用EZDSP5515使用DMA的pingpong机制,运行后发现DMA的中断标志位为1,中断发生,但是进不去中断服务程序?这是为什么,中断也都打开了,是中断向量表的问题吗?这是我的中断向量表文件
.mmregs
.include "lpva200.inc"
.C54CM_off
.CPL_off
.ARMS_off
;**********************************************************************************
; predefined stack operation modes;**********************************************************************************
; USE_RETA : 2×16-bit fast return mode (RETA used)
; NO_RETA : 2×16-bit slow return mode (RETA not used)
; C54X_STK : 32-bit fast return mode
;********************************************************************************** .global dma_isr
;.global _SAR_Isr
;.global _I2S0_TX_Isr
;.global _I2S1_RX_Isr
;**********************************************************************************
.sect "vector"
.align 256
;**********************************************************************************
;****************************************************************************
;* Other interrupt vector definitions go here
;****************************************************************************
.def _RST
_RST: .ivec reset_isr, USE_RETA; Reset / Software Interrupt #0
NMI: .ivec reset_isr ; Nonmaskable Interrupt
INT0: .ivec dummy_isr ; External User Interrupt #0
INT1: .ivec dummy_isr ; External User Interrupt #1
TINT0: .ivec dummy_isr ; Timer #0 / Software Interrupt #4
;PROG0: .ivec _I2S0_TX_Isr ; Programmable 0 Interrupt
PROG0: .ivec dummy_isr ; Programmable 0 Interrupt
UART: .ivec dummy_isr ; IIS #1 Receive Interrupt
PROG1: .ivec dummy_isr ; Programmable 1 Interrupt
DMA: .ivec dma_isr ; DMA Interrupt
;DMA: .ivec dummy_isr ; DMA Interrupt
PROG2: .ivec dummy_isr ; Programmable 2 Interrupt
COPROCFFT: .ivec dummy_isr ; Coprocessor FFT Module Interrupt
;PROG3: .ivec _I2S1_RX_Isr ; Programmable 3 Interrupt
PROG3: .ivec dummy_isr ; Programmable 3 Interrupt
LCD: .ivec dummy_isr ; LCD Interrupt
SARADC: .ivec dummy_isr ; SAR ADC Interrupt
XMIT2: .ivec dummy_isr ; I2S2 Tx Interrupt
RCV2: .ivec dummy_isr ; I2S2 Rx Interrupt
XMIT3: .ivec dummy_isr ; I2S3 Tx Interrupt
RCV3: .ivec dummy_isr ; I2S3 Rx Interrupt
RTC: .ivec dummy_isr ; RTC interrupt
SPI: .ivec dummy_isr ; SPI Receive Interrupt
USB: .ivec dummy_isr ; USB Transmit Interrupt
GPIO: .ivec dummy_isr ; GPIO Interrupt
EMIF: .ivec dummy_isr ; EMIF Interrupt
I2C: .ivec dummy_isr ; IIC interrupt
BERRIV:
IV24: .ivec dummy_isr ; Bus error interrupt
; .ref _DLOGINT_isr
DLOGIV:
IV25: .ivec dummy_isr ; Data log (RTDX) interrupt
; .ref _RTOSINT_isr
RTOSIV:
IV26: .ivec dummy_isr ; Real-time OS interrupt
IV27: .ivec dummy_isr ; General-purpose software-only interrupt
IV28: .ivec dummy_isr ; General-purpose software-only interrupt
IV29: .ivec dummy_isr ; General-purpose software-only interrupt
IV30: .ivec dummy_isr ; General-purpose software-only interrupt
IV31: .ivec dummy_isr ; General-purpose software-only interrupt
;****************************************************************************
;* Reset
;****************************************************************************
.text
.def reset_isr
.ref _c_int00
.align 2
reset_isr:
; *port(#0x1C01) = #0x0 ; Clear idles
bit (ST1, #11) = #1 ; Disable interrupts
@IVPD_L = #(_RST >> 8) || mmap()
@IVPH_L = #(_RST >> 8) || mmap()
bit(ST3,#7) = #0 ; Clear bus error interrupts
bit(ST3,#2) = #0 ; turn on clockout port
bit(ST1,#13) = #0 ; shut off XF port
@#IFR0_L = #0xffff || mmap() ; clear all pending interrupts
@#IFR1_L = #0xffff || mmap()
*port(#IDLE_ICR) = #(RESERVED_ICR|IPORT_IDLE|HWA_IDLE|DPORT_IDLE)
idle
;**********************************************************************************
; Reset all peripherals
;**********************************************************************************
*port(#0x1C04) = 0x1
nop_16
*port(#0x1C05) = 0x00FB ; Reset all peripherals
nop_16
;**********************************************************************************
; Enalbe EMIF
;**********************************************************************************
*port(IDLE_PCGCR) = #0x0
;/* Config EMIF – System Control Regsiter */
*port(#0x1C33) = #0x0
;// for SRAM in memory card (Async_CE1)
;/* Config EMIF – ASYNC Regsiters */
*port(#0x1004) = #0x0080
*port(#0x1005) = #0x00E4
;/* Configure as 16-bit data bus */
;// Async4 ==> Async_CE1 (SRAM)
*port(#0x101C) = #0x40AD
*port(#0x101D) = #0x0020
;// Async3 ==> Async_CE0(Flash)
*port(#0x1018) = #0xFFFD
*port(#0x1019) = #0x3FFF
;// do not assign Async_CE0 and Async_CE1 for NAND
*port(#0x1060) = #0x0003
;// Turn off page mode for all Chip Selects
*port(#0x1068) = #0xFCFC
*port(#0x1069) = #0xFCFC
goto _c_int00
********************************************************************************
** Name : no_isr **
** **
** Purpose : Spurious interrupt handler **
** **
** Author : **
** **
********************************************************************************
.text
no_isr: goto no_isr
dma_isr: goto dma_isr
dummy_isr:
return_int
.end
Shine:
*port(#IDLE_ICR) = #(RESERVED_ICR|IPORT_IDLE|HWA_IDLE|DPORT_IDLE)idle
这句是做什么用?
panfei du:
回复 Shine:
你好,这个是EZDSP_SAMPLE例程中的VECTOR文件。
好像找到问题了。没打开IER0的DMA中断,但是,打开后( IER0=0x0100;),程序却跑飞了
debug出现这个错误No source available for "0x7fcb5f" ,去掉 IER0=0x0100;就能DEBUG,这是什么原因呢?谢谢
Shine:
回复 panfei du:
那总中断INTM使能了吗?
如果还是跑飞的话,看一下别的中断可以吗?还是就DMA中断会跑飞?
panfei du:
回复 Shine:
总中断INTM为0,使能了,还是跑飞,这种情况是配置的问题,还是中断向量表的问题呢?谢谢
Shine:
回复 panfei du:
在中断向量表里设置断点,看是否能停。或者试一下定时器中断先保证中断的流程没问题。
panfei du:
回复 Shine:
您好,现在程序不跑飞了,但是问题是,用IER0=0x0100语句后,运行后发现IFR0的DMA位为0,但是DMA_IFR的通道0中断标志位为1,也没进入中断程序。但是去掉IER0=0x0100语句后,IFR0的DMA位为1,DMA_IFR的通道0中断标志位为1,还是进不了中断程序。这个IER0中断使能寄存器对标志位有什么影响吗?是怎么回事呢?
定时器中断应该是可以发生的。
谢谢。