Page 1 of 1

USB Serial does not transmit

Posted: Mon Feb 08, 2016 4:02 pm
by kreyl
MCU: stm32f072c8
RT v 16.1.3
I have implemented USB Serial. It successfully receives data from host using method SDU1.vmt->get.
But when I put sevral bytes with SDU1.vmt->put, host receives nothing. Driver does not tries send anything.
It seems that obnotify is to be called when transmit buffer is full.
Is this true? If yes - this is incorrect behavior. One should be able to send single byte to host :)

P.S. Just checked this out - sent 256 bytes, they were received by host successfully. A-a-a, panic, what should I do? :)

Re: USB Serial does not transmit

Posted: Mon Feb 08, 2016 4:37 pm
by Giovanni
Hi,

Look at the demos, there is an handler to call from the frame callback, it flushes the buffer every millisecond. If it is not called then the buffer is not flushed. See usbcfg.c in the various demos.

This was not required in 3.0.

Giovanni

Re: USB Serial does not transmit

Posted: Mon Feb 08, 2016 5:15 pm
by kreyl
Thanks a lot! Now all works perfectly!