cancel
Showing results for 
Search instead for 
Did you mean: 

Bug: USB CDC fails to save-echo LineCoding or respond to setCtrlLineState

Code generated for F429 using CubeMXIDE:

USB CDC code in usb_cdc_if.c does not save/echo line coding info,

nor respond (and ignore by default) to setCtrlLineState.

This prevents some OS and common utilities (ie PuTTY) from connecting via CDC.

For information on what's required, see:

http://janaxelson.com/usb_virtual_com_port.htm

or Jan's excellent book on USB.

FYI, your competitors I've used recently to create products do this correctly;

namely USB stacks from Silicon Labs, Freescale/NXP, and Microchip.

Also, CubeMX needs to provide options and generate working code for:

  • USB OTG
  • multiple USB classes

Again, you're behind your competitors here.

Thanks,

Best Regards, Dave

5 REPLIES 5

@Markus GIRDLAND​ ? @Nesrine.JLASSI​ ? @Nawres GHARBI​ ? Anybody there? 6 weeks with no response?

I believe this needs to be provided by the firmware team, I'll create a ticket for them unless they have one already.

@Markus GIRDLAND​ I'd submit a pull request, but F4 stuff is not yet available on github,

so I've attached suggested patches addressing these 4 problems in USB stack:

1) Save/restore linecontrol

2) Monitor host DTR as required to control device->host flow

3) Add callbacks to support queued (not polled!!) transmission as normal for OS applications

4) USB command processing requires wValue in some cases without payload

This requires fixes to both usb_cdc_if.c and usbd_cdc.c

Can you confirm when you've created a ticket(s) for all 4 problems and attached the suggested patches?

Thanks,

Best Regards, Dave

F4 already available on github.

https://github.com/STMicroelectronics/STM32CubeF4/

-- pa