hi to all, i am emulating a usb floppy, and i decide to use keil usb middleware with custom class(usb floppies most implement ufi class and it dose not implemented by keil) to done this project, but i have a problem with that. in some place host driver decide to reset bulk in and out pipes, and as result it will reset host data toggle to DATA0 without sending any CLEAR_FEATURE to reset device data toggle. below table is part of usb communication dump of my device:
device-endpoint phase data desc 12.0 ctl 21 00 00 00 00 00 0c 00 control-setup 12.0 out 23 00 00 00 00 00 00 00 fc 00 00 00 control-data 12.2 in 00 00 00 08 00 00 0b 40 03 00 02 00 bulk-in 12.1 in 00 00 interrupt-in 12.0 ctl 21 00 00 00 00 00 0c 00 control-setup 12.0 out 00 00 00 00 00 00 00 00 00 00 00 00 control-data 12.1 in 3a 00 interrupt-in 12.2 reset reset bulk pipe 12.2 reset reset bulk pipe 12.0 ctl 21 00 00 00 00 00 0c 00 control-setup 12.0 out 03 00 00 00 12 00 00 00 00 00 00 00 control-data 12 SSTS timeout 12 SSTS request flushed 12 reset bus reset 12 ok
as you can see every thing is ok until host decide to reset bulk pipes and as result it reset host toggle but device toggle is DATA1 and as result next data transfer in bulk in endpoint will timeout and then host reset usb pipe and this is my problem. i know that this is mistake by host, but i know where host reset pipe and now i am searching for a way to reset data toggle of my device bulk endpoints. i did not find any function or utility in keil usb middelware api to reset data toggle. now any one know any way to done that???