USB Bulk Transfer not working

Discussion around product based on ARM Cortex M3 core.

Moderators: nferre, ncollot

mohammadhage1982
Posts: 1
Joined: Tue Sep 22, 2015 6:26 pm

USB Bulk Transfer not working

Tue Sep 22, 2015 6:42 pm

I am trying to do a bulk transfer on one of my USB ping-pong endpoints.
I use wire shark to monitor the USB traffic and I cannot see the data I send.
I never send data more than the size of the end point so at least for starting, I am not worried about ping-pong. I just want to send a buffer <64 bytes and see it on the
Here is what I do, please let me know if I am missing something:

void SendUdp(uint8_t ep, const void* dataP, uint32_t len)
{
const uint8_t *data = (const uint8_t*)dataP;
uint32_t i;


while (UDP->UDP_CSR[ep] & (1 << CSR_TXPKTRDY)); //wait for CSR_TXPKTRDY clear

for(i = 0; i < len; i++)
UDP->UDP_FDR[ep] = *data++;

//set CSR_TXPKTRDY to notify the micro the buffer is ready to be send
udpCsrBitsSetClear(ep, 1 << CSR_TXPKTRDY, 0);
}

// In the UDP interrupt handler I do this

if (csr & (1 << CSR_TXCOMP))
{
//clear TXCOMP
udpCsrBitsSetClear(0, 0, 1 << CSR_TXCOMP);
}

Return to “SAM3 Cortex-M3 MCU”

Who is online

Users browsing this forum: No registered users and 1 guest