Hello, I'm trying to get my STM32 to act as a ttyACM device. It does work, but there are some things that are not ideal. I can start the USB stack by using the 'sercon' command on the NuttX shell and have the STM32 show up as a ttyACM in Linux. However, if Linux does not have the ttyACM open on its side, then NuttX hangs a bit before returning.
Example on Nuttx: omnibusf4> sercon sercon: Registering CDC/ACM serial driver sercon: Successfully registered the CDC/ACM serial driver omnibusf4> echo "hi" > /dev/ttyACM0 (... wait for several seconds here, and then the following debug is output ...) Controller error 1d: 0000 Controller error 1d: 0000 Controller error 1d: 0000 Controller error 1d: 0000 Controller error 1d: 0000 Controller error 1d: 0000 Controller error 1d: 0000 Controller error 1d: 0000 Controller error 1d: 0000 Controller error 1d: 0000 Controller error 1d: 0000 Controller error 1d: 0000 omnibusf4> If I then cat /dev/ttyACM0 on Linux, I will get the "hi" message that I sent from Nuttx, although I sent it several seconds before. If I have /dev/ttyACM0 open on Linux I get the message immediately and the echo from Nuttx returns immediately. What I want is to have NuttX drop the message and not have it buffered in the USB stack if it is not open on the host device(Linux, Windows, etc) since for my application the messages are time-sensitive and only live messages make sense. Is this possible? I am only testing this with the terminal at the moment, but if I need to use a special ioctl or something like that, that would be fine too. -Robert Middleton