TI中文支持网
TI专业的中文技术问题搜集分享网站

EDMA与QMSS

各位专家好:

      我在FFTC的例程中加入EDMA3时,发现EDMA3函数(EDMA3_DRV_enableTransfer)与QMSS(Qmss_init)冲撞,不能进入中断函数;将EDMA3_DRV_enableTransfer 放在  Qmss_init 前可以进入中断函数,放在  Qmss_init 后边不能进入中断函数。 这可能是哪里出了问题?

    关于QMSS的程序如下所示:

memset (&qmssInitConfig, 0, sizeof (Qmss_InitCfg));/* Set up QMSS configuration.** Use internal linking RAM.*/qmssInitConfig.linkingRAM0Base  =0;qmssInitConfig.linkingRAM0Size  =0;qmssInitConfig.linkingRAM1Base  =0;qmssInitConfig.maxDescNum=FFTC_NUM_HOST_DESC;

#ifdef xdc_target__bigEndianqmssInitConfig.pdspFirmware[0].pdspId= Qmss_PdspId_PDSP1;qmssInitConfig.pdspFirmware[0].firmware = &acc48_be;qmssInitConfig.pdspFirmware[0].size= sizeof (acc48_be);
#elseqmssInitConfig.pdspFirmware[0].pdspId= Qmss_PdspId_PDSP2;//Qmss_PdspId_PDSP1qmssInitConfig.pdspFirmware[0].firmware = &acc48_le;qmssInitConfig.pdspFirmware[0].size= sizeof (acc48_le);
#endif/* Initialize the Queue Manager */if ((result = Qmss_init (&qmssInitConfig, &qmssGblCfgParams)) != QMSS_SOK){System_printf ("Error initializing Queue Manager SubSystem, Error code : %d\n", result);return -1;}

关于EDMA程序如下所示:

hEdma = edma3init(edmaInstance, &edmaResult);if (hEdma){printf("edma3init() Passed\n");}else{printf("edma3init() Failed, error code: %d\n", (int)edmaResult);}

//tcc = EDMA3_DRV_TCC_ANY;
//chId= EDMA3_DRV_DMA_CHANNEL_ANY;result = EDMA3_DRV_requestChannel (hEdma, &chId, &tcc, (EDMA3_RM_EventQueue)0, &callback1, NULL);//&callback1if (result == EDMA3_DRV_SOK){printf("DMA channel 0: %d\n", chId);}else{printf("DMA channel 0 request failed!\n");}/* Fill the PaRAM Set with transfer specific information */paramSet.srcAddr= (uint32_t)(Data);paramSet.destAddr= (uint32_t)(Data_Twi);/*** Be Careful !!!* Valid values for SRCBIDX/DSTBIDX are between -32768 and 32767* Valid values for SRCCIDX/DSTCIDX are between -32768 and 32767*/paramSet.srcBIdx= acnt;paramSet.destBIdx= acnt*ccnt;paramSet.srcCIdx= acnt*bcnt;paramSet.destCIdx= acnt;/*** Be Careful !!!* Valid values for ACNT/BCNT/CCNT are between 0 and 65535.* ACNT/BCNT/CCNT must be greater than or equal to 1.* Maximum number of bytes in an array (ACNT) is 65535 bytes* Maximum number of arrays in a frame (BCNT) is 65535* Maximum number of frames in a block (CCNT) is 65535*/paramSet.aCnt= acnt;paramSet.bCnt= bcnt;paramSet.cCnt= ccnt;paramSet.linkAddr= 0xFFFFU;paramSet.opt= 0x00900004u;result = EDMA3_DRV_setPaRAM(hEdma, chId, &paramSet);if (result == EDMA3_DRV_SOK){printf("EDMA3_DRV_setPaRAM() Passed\n");}else{printf("EDMA3_DRV_setPaRAM() Failed, error code: %d\n", (int)edmaResult);}

//for (i = 0; i < ccnt; i++)
//{irqRaised1 = 0;result = EDMA3_DRV_enableTransfer (hEdma, chId,  EDMA3_DRV_TRIG_MODE_MANUAL);if (result != EDMA3_DRV_SOK){printf ("edma3_test: EDMA3_DRV_enableTransfer " \"Failed, error code: %d\r\n", (int)result);
//break;}

//printf ("%d \n", i);while (irqRaised1 == 0u){/* Wait for the Completion ISR. */printf ("waiting for interrupt...\n");}/* Check the status of the completed transfer */if (irqRaised1 < 0){/* Some error occured, break from the FOR loop. */printf ("\r\nedma3_test: Event Miss Occured!!!\r\n");/* Clear the error bits first */result = EDMA3_DRV_clearErrorBits (hEdma, chId);
//break;}for(k=0; k<128; k++){for(jj=0; jj<2048; jj++){if((Data[jj*128+k].real == Data_Twi[k*2048+jj].real) || (Data[jj*128+k].imag == Data_Twi[k*2048+jj].imag)){;}else{printf("(%d , %d)", k,jj);}}}k = 0;

//}

Nancy Wang:

EDMA3_DRV_enableTransfer 里面应该有注册中断的程序吧,所以放在Qmss_init后面无法识别中断。

kang xiao:

回复 Nancy Wang:

EDMA3_DRV_enableTransfer 里面是有注册中断的程序,但现在在需要放到Qmss_init后面,我应该怎么修改呢?

kang xiao:

回复 Nancy Wang:

为什么把EDMA3_DRV_enableTransfer 放在Qmss_init后面就无法识别中断了?

Nancy Wang:

回复 kang xiao:

不一定就是没有识别,我建议查一下中断相关的寄存器状态判断一下是没有识别中断还是只是无法进入中断函数,缩小一下问题的范围。

kang xiao:

回复 Nancy Wang:

识别中断和进入中断不是一个意思吗? 我在中断函数开始处设置断点,不会在断点处停止,所以可能是没有识别中断。

kang xiao:

回复 Nancy Wang:

你好,我查了以下几个寄存器:Interrupt Enable Register 值是 1 -> enable; Event Enable Register 值是 0-> not enable; Event Missed Register 值是 0 -> nor miss;请问这说明有没有识别中断?

feng jiang:

不是很懂这个问题。

赞(0)
未经允许不得转载:TI中文支持网 » EDMA与QMSS
分享到: 更多 (0)