2015-01-17 01:16 PM
Hello,
I have a STM32F4 Discovery board, which I plan to use as sensor-based data acquisition board, switching from RS232 to USB communication with host. The simplest path I see to take is to make the device a Virtual Com Port. There are a lot of examples with code such ashttps://github.com/MaJerle/stm32f429/tree/master/24-STM32F429_USB_VCP
and this is highly appreciated. I use the STMCubeMX application to generate the system skeleton, and I develop within the ''/* BEGIN USER CODE */ and /* END USER CODE */. This is great because I can swap out configurations, and STMCube writes out new code, but preserves my code. I naively tried to use the USB packages from STMCubeMX but it doesn't work. I do have the example described above to work, but now I am tied to that particular configuration of code. Therefore, I cannot use STMCubeMX anymore to change settings and write new code. My question is whether anyone knows what needs to be done to the USB code generated by STMCubeMX to get it to work as a CDC VCP? That way, I can continue to work within the STMCubeMX/Keil framework. Thanks, -Joe **************************** P.S. - This has been very happily resolved, complete with working code and a summary of steps required. Please see the reply to this thread on 19 Jan for the information #st2015-02-06 03:22 PM
I have no idea why inclusion of the FreeRTOS renders the code to not work, but I'm not surprised. Sometimes, I feel like everything is just one line of code away from not working.
I still have some issues with this code, however. I have to plug-unplug-plug the USB for my Windows machine to connect with the COM port. But, at least, I do have the communications happening. So, I'm basically happy.2015-02-13 01:21 AM
2015-05-13 04:14 PM
FWIW, I see this fix in the STM code today, STM32Cube_FW_F4_V1.5.0.