Hi,
We use a phytec product : Phycore AM335x with am3359 Processor.
We have generate the linux BSP with Buildroot 05.2013 and the patch from phytec :
ftp://ftp.phytec.de/pub/Products/phyCORE-AM335x/Linux/PD13.1.2/
I want to extend my own kernel driver for the DCAN with EDMA use.
I want to use the IF3 for the DCAN0 -> it means channel 47 of the EDMA.
I use the API of the edma to initialise the DMA transfer :
dev->edmaCh = edma_alloc_channel(47,callback1,dev,EVENTQ_DEFAULT);
if(dev->edmaCh < 0)
{
return -1;
}
edma_set_src (dev->edmaCh, (unsigned long)(dev->phys_base + 0x144), INCR, W8BIT);
edma_set_dest (dev->edmaCh, (unsigned long)(dev->dmaphysdest1), INCR, W8BIT);
edma_set_src_index (dev->edmaCh, 0, 0);
edma_set_dest_index (dev->edmaCh, 0, 0);
/* A Sync Transfer Mode */
edma_set_transfer_params (dev->edmaCh, 20, 1, 1, 1, ASYNC);
/* Enable the DMA Interrupts */
edma_read_slot (dev->edmaCh, ¶m_set);
param_set.opt |= (1 << ITCINTEN_SHIFT);
param_set.opt |= (1 << TCINTEN_SHIFT);
param_set.opt |= EDMA_TCC(EDMA_CHAN_SLOT(dev->edmaCh));
edma_write_slot (dev->edmaCh, ¶m_set);
edma_start(dev->edmaCh);
I expect that the DMA transfer will wait on the event-triggered transfer request from the channel 47.
But it is not the case ! I receive a DMA_COMPLETE in my callback just after the call of the edma_start() function.
What is wrong ? do I forget something ?
Catherine