How best to do CDC Host PC to microcontroller virtual com port communications?
How best to do CDC Host PC to microcontroller virtual com port communications?
I followed this excellent tutorial https://www.youtube.com/watch?v=XRocqTfUxbo
to get USB working as mouse (tis a custom board with STM32F103C8TX) - so I know USB is
working. Then I found more tutorials and got microcontroller to Host PC working
using CDC_Transmit_FS.
(I’m running Ubuntu 14.04 and used CubeMX 4.15.1 to generate all the code and AC6
to compile using SW4STM32 toolchain and debug using ST-Link V2.)
Then I ran into a whole mass of confusing information about CDC_Receive_FS
and how to receive data from Host PC to microcontroller.
The source of the problems seems to be
1) There is no overal description of how CDC_Receive_FS should be used with worked cubemx example - anyone know where where I can get it?
2) No clean example of how CDC_Receive_FS is used with CubeMx similar to video tutorial like the one for mouse mentioned above
3) Not clear if CDC_Receive_FS is a callback function - if it is a callback function, how are the buffers set up first time around and how should the data be extracted from those buffers?
4) There are manual examples without use of CubeMX that I could try to use, but CubeMX benefit would get lost so I prefer to use CubeMx generated code as much as possible.
5) It is possible to trawl through all the material and eventually solve this puzzle - so aim is to save time.
I have seen all kinds of material where USB virtual com post host PC to microcontroller is working for someone - its just that as a relative newbie, it seems to be harsh journey to get a grip on the subject to make CubeMX work with AC6 to make Host PC to microcontroller working. Any help to get there conscisely and quickly greatly appreciated