hello, I use the DSK C6711 board with the PCM3003 daughtercard. I want to use the EDMA to transfer my data at 48 Khz. I use an Edma channel to receive the data from the serial port Mcbsp1 an an other to transmit the data to Mcbsp1. But I have an awful output signal. I think that my configurations for the EDMA are not correct but I don't know where.. Do someone already use the Edma with the serial port Mcbsp1? I send my programm, if someone can help me.. thanks #include <csl.h> #include <csl_edma.h> #include <csl_irq.h> #include <csl_mcbsp.h> EDMA_Handle hEdma_ch14,hEdmaLINK; EDMA_Handle hEdma_ch15,hEdmaLINK2; void edma_init(); #define BUFF_SIZE 64 short buffer[BUFF_SIZE]; /* prototypes */ void init_HWI(void); void emif_init(void); EDMA_Config edmaXmitParam= { EDMA_OPT_RMK( EDMA_OPT_PRI_LOW, EDMA_OPT_ESIZE_16BIT, EDMA_OPT_2DS_NO, EDMA_OPT_SUM_INC, EDMA_OPT_2DD_NO, EDMA_OPT_DUM_NONE, EDMA_OPT_TCINT_YES, EDMA_OPT_TCC_OF(5), EDMA_OPT_LINK_YES, EDMA_OPT_FS_NO ), EDMA_SRC_OF(buffer), EDMA_CNT_OF(BUFF_SIZE), EDMA_DST_OF(0), EDMA_IDX_OF(0), EDMA_RLD_OF(0) }; EDMA_Config edmaRcvParam= { EDMA_OPT_RMK( EDMA_OPT_PRI_LOW, EDMA_OPT_ESIZE_16BIT, EDMA_OPT_2DS_NO, EDMA_OPT_SUM_INC, EDMA_OPT_2DD_NO, EDMA_OPT_DUM_NONE, EDMA_OPT_TCINT_YES, EDMA_OPT_TCC_OF(6), EDMA_OPT_LINK_YES, EDMA_OPT_FS_NO ), EDMA_SRC_OF(0), EDMA_CNT_OF(BUFF_SIZE), EDMA_DST_OF(buffer), EDMA_IDX_OF(0), EDMA_RLD_OF(0) }; void main (void) { CSL_init(); mcbsp1_init(); emif_init(); init_HWI(); edma_init(); EDMA_setChannel(hEdma_ch14); EDMA_setChannel(hEdma_ch15); while(1); } void emif_init(void){ } void init_HWI(void) { IRQ_globalEnable(); // Enable ints globally IRQ_enable(IRQ_EVT_EDMAINT); // Enable EDMA interrupt (to CPU) } void edma_init() { hEdma_ch14 = EDMA_open( EDMA_CHA_XEVT1, EDMA_OPEN_RESET ); hEdma_ch15 = EDMA_open( EDMA_CHA_REVT1, EDMA_OPEN_RESET ); hEdmaLINK = EDMA_allocTable( -1 ); hEdmaLINK2 = EDMA_allocTable( -1 ); edmaXmitParam.dst = _MCBSP_DXR1_ADDR; edmaXmitParam.rld = (edmaXmitParam.rld & 0xFFFF0000) | (EDMA_RLD_RMK(0,hEdmaLINK)); edmaRcvParam.src = _MCBSP_DRR1_ADDR; edmaRcvParam.rld = (edmaRcvParam.rld & 0xFFFF0000) | (EDMA_RLD_RMK (0,hEdmaLINK2)); EDMA_config(hEdma_ch14, &edmaXmitParam); EDMA_config(hEdma_ch15, &edmaRcvParam); EDMA_config(hEdmaLINK, &edmaXmitParam); EDMA_config(hEdmaLINK2, &edmaRcvParam); EDMA_enableChannel( hEdma_ch14 ); EDMA_enableChannel( hEdma_ch15 ); EDMA_intClear(5); EDMA_intClear(6); EDMA_intEnable(5); EDMA_intEnable(6); } |
|
Pb with edma & Mcpsp1
Started by ●August 6, 2003
Reply by ●August 11, 20032003-08-11
Dear , Could you add the McBSP head file created by CDB? Check if the EDMA source/desnestion is correct for Xmt/Rcv? ----- Original Message ----- From: "nadbret" <> To: <> Sent: Wednesday, August 06, 2003 8:48 PM Subject: [c6x] Pb with edma & Mcpsp1 > hello, > > I use the DSK C6711 board with the PCM3003 daughtercard. > I want to use the EDMA to transfer my data at 48 Khz. I use an Edma > channel to receive the data from the serial port Mcbsp1 an an other > to transmit the data to Mcbsp1. But I have an awful output signal. I > think that my configurations for the EDMA are not correct but I don't > know where.. > Do someone already use the Edma with the serial port Mcbsp1? > I send my programm, if someone can help me.. > > thanks > #include <csl.h> > #include <csl_edma.h> > #include <csl_irq.h> > #include <csl_mcbsp.h> > > EDMA_Handle hEdma_ch14,hEdmaLINK; > EDMA_Handle hEdma_ch15,hEdmaLINK2; > > void edma_init(); > > #define BUFF_SIZE 64 > short buffer[BUFF_SIZE]; > > /* prototypes */ > void init_HWI(void); > void emif_init(void); > > EDMA_Config edmaXmitParam= > EDMA_OPT_RMK( > EDMA_OPT_PRI_LOW, > EDMA_OPT_ESIZE_16BIT, > EDMA_OPT_2DS_NO, > EDMA_OPT_SUM_INC, > EDMA_OPT_2DD_NO, > EDMA_OPT_DUM_NONE, > EDMA_OPT_TCINT_YES, > EDMA_OPT_TCC_OF(5), > EDMA_OPT_LINK_YES, > EDMA_OPT_FS_NO > ), > EDMA_SRC_OF(buffer), > EDMA_CNT_OF(BUFF_SIZE), > EDMA_DST_OF(0), > EDMA_IDX_OF(0), > EDMA_RLD_OF(0) > }; > > EDMA_Config edmaRcvParam= > EDMA_OPT_RMK( > EDMA_OPT_PRI_LOW, > EDMA_OPT_ESIZE_16BIT, > EDMA_OPT_2DS_NO, > EDMA_OPT_SUM_INC, > EDMA_OPT_2DD_NO, > EDMA_OPT_DUM_NONE, > EDMA_OPT_TCINT_YES, > EDMA_OPT_TCC_OF(6), > EDMA_OPT_LINK_YES, > EDMA_OPT_FS_NO > ), > EDMA_SRC_OF(0), > EDMA_CNT_OF(BUFF_SIZE), > EDMA_DST_OF(buffer), > EDMA_IDX_OF(0), > EDMA_RLD_OF(0) > }; > > void main (void) > { > CSL_init(); > mcbsp1_init(); > emif_init(); > > init_HWI(); > > edma_init(); > EDMA_setChannel(hEdma_ch14); > EDMA_setChannel(hEdma_ch15); > > while(1); > } > > void emif_init(void){ > } > > void init_HWI(void) > { > IRQ_globalEnable(); // Enable ints globally > IRQ_enable(IRQ_EVT_EDMAINT); // Enable EDMA interrupt (to > CPU) > } > > void edma_init() > > > hEdma_ch14 = EDMA_open( EDMA_CHA_XEVT1, EDMA_OPEN_RESET ); > hEdma_ch15 = EDMA_open( EDMA_CHA_REVT1, EDMA_OPEN_RESET ); > hEdmaLINK = EDMA_allocTable( -1 ); > hEdmaLINK2 = EDMA_allocTable( -1 ); > > edmaXmitParam.dst = _MCBSP_DXR1_ADDR; > edmaXmitParam.rld = (edmaXmitParam.rld & 0xFFFF0000) | > (EDMA_RLD_RMK(0,hEdmaLINK)); > > edmaRcvParam.src = _MCBSP_DRR1_ADDR; > edmaRcvParam.rld = (edmaRcvParam.rld & 0xFFFF0000) | (EDMA_RLD_RMK > (0,hEdmaLINK2)); > EDMA_config(hEdma_ch14, &edmaXmitParam); > EDMA_config(hEdma_ch15, &edmaRcvParam); > > EDMA_config(hEdmaLINK, &edmaXmitParam); > EDMA_config(hEdmaLINK2, &edmaRcvParam); > > EDMA_enableChannel( hEdma_ch14 ); > EDMA_enableChannel( hEdma_ch15 ); > EDMA_intClear(5); > EDMA_intClear(6); > > EDMA_intEnable(5); > EDMA_intEnable(6); > } > > _____________________________________ > Note: If you do a simple "reply" with your email client, only the author of this message will receive your answer. You need to do a "reply all" if you want your answer to be distributed to the entire group. > > _____________________________________ > About this discussion group: > > To Join: Send an email to > > To Post: Send an email to > > To Leave: Send an email to > > Archives: http://www.yahoogroups.com/group/c6x > > Other Groups: http://www.dsprelated.com > ">http://docs.yahoo.com/info/terms/ > > |