AnsweredAssumed Answered

STM32 F0 HAL 1.6.0 USB CDC usage (receiving data)

Question asked by zepp.jon on Aug 1, 2016
Latest reply on Aug 6, 2016 by zepp.jon
I've got an f070 chip on a board interfaced with a USB port, I used the current 1.6.0 HAL libraries for the f0 series in MXCube to generate the base code needed and through a little of my own have demonstrated that the function CDC_Transmit_FS() (of usb_cdc_if.c) works by sending formatted text and variables back over the USBport through the VCP interface and into a terminal application on my computer.  I can't for the life of me figure out how to read from the receive buffer or otherwise receive data sent from the computer using the HAL firmware - CDC_Receive_FS() of the same class is static and modifying that and invoking it makes the chip hang completely on trying to read (including with no data written).

There are several tutorials to how to use the HAL CDC interface, but none for the current HAL driver version and for the f0 series chips, and there seems to be some dramatic differences in their implementation on other firmware versions and for other stm32 platforms, so I'm wondering what I'm supposed to be calling in my program to receive data (in any format) on the microcontroller from the attached computer.

Ideas?  Is there an alternative version of the firmware with a working receive/read function?  Is there a version designed for a different series of chips that could be easily ported or integrated into the ones I'm using?  I may be missing something obvious, but it's been difficult to tell after digging through the firmware source somewhat and I haven't been able to locate an example that will compile or that seems to be using the same functions I see available in the headers for the CDC classes.