This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[OMAPL137] EDMA3 driver and callback function

Hi,

I'm using OMAP  L137, EDMA3 driver 01.06.00.01 and BIOS 5.33.03. The EDMA is used to manage SPI transmission.

In the driver there is only 1 function which allows hooking my callback function which will be executed upon completion of the transfer. The function is EDMA3_DRV_requestChannel(). It works well if the function is executed each time before setting up transfer parameters and triggering the transfer (before calling EDMA3_DRV_requestChannel() another function EDMA3_DRV_freeChannel() is called). Since it should be sufficient to request the transmit channel once only, I moved the function to transmission openning procedure which is executed only once and while setting transmission parameters I enable EDMA3_DRV_OPT_FIELD_TCINTEN bit in the OPT register in PaRAM set of the channel - EDMA3_DRV_setOptField(). The transmission goes well first time and the callback is called, 2-nd time the transmission goes well but the callback is not called and the 3rd time program hangs.

Is it really necessary to call EDMA3_DRV_freeChannel()-EDMA3_DRV_requestChannel() each time I want to hook my callback function? or there is any other way to avoid that?

Regards

Maciek

OK, I found where is the issue, if there is no linked channel which reloads SPI Tx DMA channel (like in my case), I need also to take care about TCC parameter in OPT, obviously EDMA3_DRV_setOptField() takes care about only one parameter and setting EDMA3_DRV_OPT_FIELD_TCINTEN is not sufficient.