UOTGHS DMA not sending anything

Discussion around product based on ARM Cortex M3 core.

Moderators: nferre, ncollot

lgrunenberg
Posts: 2
Joined: Wed Jun 24, 2015 6:10 pm

UOTGHS DMA not sending anything

Wed Jun 24, 2015 6:22 pm

Hello everybody,
i am trying to implement an isochronous IN transfer using the UOTGHS device. The micro used is a SAM3X8E and it is in device role.

Transfer from device to host works when not using DMA and when using the AHB DMA but so far i had no luck getting it to work using the UTOGHS DMA controller.

As far as i can see, everything is set up according to the ASF files but nothing is sent. After starting the transfer, the CHANN_ENB bit reads as set but the BUFF_COUNT value does not decrement (remains at initial value as written to BUFF_LENGTH). Of course no DMA interrupt is fired and the BYCT value stays at zero. 


What am i doing wrong?

Code: Select all

	// set DMA start addres
UOTGHS->UOTGHS_DEVDMA[bEndpoint].UOTGHS_DEVDMAADDRESS = (unsigned int)&inputIsocDataBuffer;

// Clear status
UOTGHS->UOTGHS_DEVDMA[bEndpoint].UOTGHS_DEVDMASTATUS;

// Enable IT DMA
UOTGHS->UOTGHS_DEVIER = UOTGHS_DEVIER_DMA_1 << (bEndpoint - 1);

// Start DMA transfer
	UOTGHS->UOTGHS_DEVDMA[bEndpoint].UOTGHS_DEVDMACONTROL = 0;
UOTGHS->UOTGHS_DEVDMA[bEndpoint].UOTGHS_DEVDMACONTROL = 
         ((UOTGHS_DEVDMACONTROL_BUFF_LENGTH(1024))
           | UOTGHS_DEVDMACONTROL_END_B_EN
           | UOTGHS_DEVDMACONTROL_END_BUFFIT | UOTGHS_DEVDMACONTROL_CHANN_ENB
		   | UOTGHS_DEVDMACONTROL_END_TR_IT | UOTGHS_DEVDMACONTROL_END_TR_EN);
lgrunenberg
Posts: 2
Joined: Wed Jun 24, 2015 6:10 pm

Re: UOTGHS DMA not sending anything

Thu Jun 25, 2015 7:27 pm

Found the solution: UOTGHS->UOTGHS_DEVDMA[bEndpoint - 1] has to be written instead of UOTGHS->UOTGHS_DEVDMA[bEndpoint].

DMA write works now but auto-validate doesn't. I have to set TXINIC and FIFOCONC in the DMA interrupt handler. How can i get the it to auto validate?

Return to “SAM3 Cortex-M3 MCU”

Who is online

Users browsing this forum: No registered users and 1 guest