USB Serial does not transmit

Discussions and support about ChibiOS/HAL, the MCU Hardware Abstraction Layer.
Post Reply
User avatar
kreyl
Posts: 59
Joined: Sun Jan 13, 2013 11:46 pm
Been thanked: 4 times

USB Serial does not transmit

Post 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? :)
User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: USB Serial does not transmit

Post 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
User avatar
kreyl
Posts: 59
Joined: Sun Jan 13, 2013 11:46 pm
Been thanked: 4 times

Re: USB Serial does not transmit

Post by kreyl »

Thanks a lot! Now all works perfectly!
Post Reply