Trying to send a shorter data-phase on EP0IN request. | Cypress Semiconductor
Trying to send a shorter data-phase on EP0IN request.
when I try to send a shorter data-phase on a EP0IN control request, it doesn't seem to work as described in TRP sec. 8.7.1 or maybe I misunderstood something.
The device (FX2LP) always send as much data as the wLength field of the control request dictates, no matter what I set into the EP0BCL.
First, I've had a look at the "Vend_ax" example code to see how it is done for the there VR_UPLOAD request. I made my code just like that...
Looping through these steps until all data are sent:
(1) write some data to the EP0BUF
(2) set the EP0BCL to some value
(3) wait until (EP0CS & bmEPBUSY) gets to zero.
Anyhow, I tried to play with this SDPAUTO bit, and see how it works, but no effect on my problem. The device always send as much data as the wLenght field say.
The TRM say in 8.7.1 "... the EZ-USB sends the smaller of these two length fields.", but that doesn't seem to happen for me, even if wLength's value is 100 and I set the EP0BCL's value to 1, I will get 100 bytes...
What am I missing?
Any ideas are greatly appreciated.