Sign in

username:

password:



Not a member?

Search c6x



Search tips

Subscribe to c6x



c6x by Keywords

AD535 | BIOS | Booting | Bootloader | C621 | C6211 | C6415 | C671 | C6711 | C6711DSK | C6713 | CCS | Chassaing | COFF | DAT | DM64 | DM642 | DMA | DSK671 | DSK6711 | EDM | EDMA | EMIF | Emulator | EVM | EVM620 | FFT | FIR | GPIO | Halting | HPI | HWI | IDK | JTAG | LDB | LDH | LDW | Linker | LMS | LOG_printf | Matlab | McBSP | MEM_alloc | MIPS | PCI | PCM3003 | Pipeline | Profiling | QDM | Reset | ROM | RTDX | Sampling | SDRAM | Stack | TEB | THS1206 | TMS320C621 | TMS320C6416 | TMS320C6711 | TMS320C6713 | UART | Vector Table | XBUS | XDS560

Sponsor

Industry's highest performing at the lowest power DSPs now as low as $5.00*
Start development today!
*volume pricing for 10ku

Discussion Groups

See Also

Embedded SystemsFPGAElectronics

Discussion Groups | TMS320C6x | Need urgy help at EDMA and FIFO transfer

Technical discussions about the TI C6000 DSPs (including the c62x, c64x and c67x DSPs).

  

Post a new Thread

Need urgy help at EDMA and FIFO transfer - catd...@gmail.com - Jul 19 11:59:43 2008

Hi,there.
I am working on a TI TMS32DM642EVM borad with an extension of daughter card.

I am using IDT72V2105 and Altera EPM7064AE on the daughter card to capture video
data. They are assigned at CE2 space.

I'm using EX_int5 as the Half-Full interrupt of FIFO to triger an EDMA transfer,
and hwi_int8 to triger data process function.

but the problem is :
1: Ex_int5 function can be interrupted, but edma is not generating transfer
complete interupt. and hwi_int8 doesn't triger anything.
2: During the edma transfer, i found the data did moved in the memory window.But
the pins of AOE,CE2,ARE,AWE doesn't fall low,they keep at high level, i need
their low level to triger FIFO read out fuction on EPM7064AE. 
3. When i add a handler of EMIFA in DSP/BIOS to initialize CE2 space and choose
Pre-initialization, all my interrupt function doesn't work any more.

Sorry about my bad english.
Can anybody help me ? It is very urgy for me.
Thanks..

My code:

/* Create the EDMA configuration structure for left transfers */
EDMA_Config cfgEdmaLeft = {  
  EDMA_OPT_RMK(
  	EDMA_OPT_PRI_HIGH,
    EDMA_OPT_ESIZE_8BIT,
	EDMA_OPT_2DS_NO,
	EDMA_OPT_SUM_INC,
	EDMA_OPT_2DD_NO,
	EDMA_OPT_DUM_INC,
	EDMA_OPT_TCINT_YES,
	EDMA_OPT_TCC_OF(0),
	EDMA_OPT_TCCM_OF(0),
	EDMA_OPT_ATCINT_NO,
	EDMA_OPT_ATCC_OF(0),
	EDMA_OPT_PDTS_DISABLE,
	EDMA_OPT_PDTD_DISABLE,
	EDMA_OPT_LINK_NO,
	EDMA_OPT_FS_YES
  ),
  EDMA_SRC_OF(0x80000000),
  EDMA_CNT_OF((((FR_COUNT - 1)<< 16) | (EL_COUNT & 0xffff))),
  EDMA_DST_OF(0x81000000),
  EDMA_IDX_OF(0x00000000),
  EDMA_RLD_OF(0x00000000)
};                         

/* Create the EDMA configuration structure for right transfers */
EDMA_Config cfgEdmaRight = {
  EDMA_OPT_RMK(
    EDMA_OPT_PRI_HIGH,
    EDMA_OPT_ESIZE_8BIT,
	EDMA_OPT_2DS_NO,
	EDMA_OPT_SUM_INC,
	EDMA_OPT_2DD_NO,
	EDMA_OPT_DUM_INC,
	EDMA_OPT_TCINT_YES,
	EDMA_OPT_TCC_OF(0),
	EDMA_OPT_TCCM_OF(0),
	EDMA_OPT_ATCINT_NO,
	EDMA_OPT_ATCC_OF(0),
	EDMA_OPT_PDTS_DISABLE,
	EDMA_OPT_PDTD_DISABLE,
	EDMA_OPT_LINK_NO,
	EDMA_OPT_FS_YES
  ),
  EDMA_SRC_OF(0x80000800),
  EDMA_CNT_OF((((FR_COUNT - 1)<< 16) | (EL_COUNT & 0xffff))),
  EDMA_DST_OF(0x81001000),
  EDMA_IDX_OF(0x00000000),
  EDMA_RLD_OF(0x00000000)
}; 
void initEdma()   // Initialize EDMA HANDLE.
{
		
	/* Lets open up the EDMA channel associated with extint5. */
	hEdma = EDMA_open(EDMA_CHA_ANY, EDMA_OPEN_RESET);

	/* We also need two EDMA reload parameter sets so let's allocate them */
  	/* here. Notice the -1, this means allocate any availale tale.        */
  	hEdmaLeft = EDMA_allocTable(-1);
  	hEdmaRight = EDMA_allocTable(-1);
  	
  	/* Let's copy the ping reload configuration structure to an */
  	/* intermediate configuration structure.                    */
  	cfgEdma = cfgEdmaLeft;
  
  	/* Let's initialize the link fields of the configuration structures */
  	cfgEdmaLeft.rld = EDMA_RLD_RMK(0,hEdmaLeft);
  	cfgEdmaRight.rld = EDMA_RLD_RMK(0,hEdmaRight);
  	cfgEdma.rld     = EDMA_RLD_RMK(0,hEdmaRight);

  	/* Now let's program up the EDMA channel with the configuration structure */
  	EDMA_config(hEdma, &cfgEdma);   
  
  	/* Let's also configure the reload parameter tables in the EDMA PRAM */
  	/* with the values in the configuration structures.                  */
  	EDMA_config(hEdmaLeft, &cfgEdmaLeft);
  	EDMA_config(hEdmaRight, &cfgEdmaRight);
  	
  	/* Enable the EDMA channel */
  	EDMA_enableChannel(hEdma); 
  	
  	LOG_printf(&trace,"EDMA OVER!\n");
}
void intConfig()  // intialzie interrupts
{	
	IRQ_reset(IRQ_EVT_EXTINT5);
	IRQ_reset(IRQ_EVT_EDMAINT);
	
	IRQ_enable(IRQ_EVT_EDMAINT);          /* Enable EDMA -> CPU interrupt   */
	IRQ_enable(IRQ_EVT_EXTINT5);
    LOG_printf(&trace,"INT OVER!\n");
}

void hwiFifo(int arg)  //Ex_int5 interrupt function
{
	EDMA_setChannel(hEdma);
	LOG_printf(&trace,"BEGIN!\n");
	
}

void hwiEdma(int arg)  //Hwi_int8 interrupt function
{
	/* Clear the pending interrupt from the EDMA interrupt pending register */
	
	//Left and Right
	leftright = (leftright +1) & 1;
	
	if(leftright){
	
		EDMA_link(hEdma,hEdmaLeft);
		
	}else{
		
		EDMA_link(hEdma,hEdmaRight);
	}
	
	LOG_printf(&trace,"END!\n");
	SEM_post(&finish);
}



______________________________
Start your Android Ice Cream Sandwich development on TI's AM35x Sitara ARM Cortex-A8 processor today.



(You need to be a member of c6x -- send a blank email to c6x-subscribe@yahoogroups.com )