Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by storm9113 on Thu Oct 23 02:50:51 MST 2014
Hi all,

I am working on USB transfert on LPC4357.

I used the cdc_vcom example and removed all the vcom part to only keep the init of USB and handlers and then call a WriteEP to send data to Host.

I am able to send the data but I wanted to ask 2 questions about the USB mechanism.

1- In LPCopen is this USB mechanism using CPU or is the USB module working by it own without needing CPU ressources  ?

2- If it is using CPU, how to know when a transfer is complete, I guess a completion interrupt comes out ?

For example if I try to send by this way

g_pUsbApi->hw->WriteEP (g_hUsb, EP, (uint8_t*)buf1, size1);
g_pUsbApi->hw->WriteEP (g_hUsb, EP, (uint8_t*)buf2, size2);

Using this methode I can receive data on host but some data is missing.

- Am I using a wrong method ? Or do I just made an error in writeEP function ?

Thank you very much