cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F4 Discovery Board and VCP USB drivers/application

jsvirzi
Associate II
Posted on January 17, 2015 at 22:16

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 as

https://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

#st
12 REPLIES 12
jsvirzi
Associate II
Posted on February 07, 2015 at 00:22

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.

ad2
Associate
Posted on February 13, 2015 at 10:21

hello,you can have a look at www.stm32cube.com,good luck!

Posted on May 14, 2015 at 01:14

FWIW, I see this fix in the STM code today, STM32Cube_FW_F4_V1.5.0.