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);