Hello Matteo,
What you are probably facing is the fact that when USB Device is not ready for sending data and "NAK" these transactions, USB Host does implement a delay in order to wait until device is ready for any further transaction.
There is a macro definition that defines the maximum quantity of NAKs received from device before implementing the delay. You can modify this macro to a higher NAK value and also reduce the delay size.
Please, do next changes:
- In khci_kinetis.c file, locate _usb_khci_atom_tr function and modify int_32 delay_const variable to 1 instead of 10. (Line 223)
- In host_cnfg.h file, locate USBCFG_DEFAULT_MAX_NAK_COUNT macro and modify it to 150 instead of 15. (Line 67)
Recompile the project and now it should be faster than before. For more information please see this post: https://community.freescale.com/thread/320155?q=usb%20transfer
I hope this can help you.
Best Regards,
Isaac
----------------------------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
----------------------------------------------------------------------------------------------------------------------------------------