cancel
Showing results for 
Search instead for 
Did you mean: 

STM32_USB-FS-Device_Lib_V3.3.0

stst9189
Associate II
Posted on November 18, 2011 at 11:04

Thanks for the above ST. I was very pleased to hear it should be easy to port to my Keil MCBSTM32 board from Keil and ultimately to my Target hardware.

This however does not seem to be the case. The STM32_EVAL software seems to be deeply embedded in to the example and I can find no documentation telling me how to build even for the various STM32_EVAL boards. I can also see not documentation how to port to a new board.

Am I missing something ?

#usb-cdc-hid #usb #um0424
4 REPLIES 4
Posted on November 18, 2011 at 17:12

The general rule is that you're going to have to enumerate the pins/functions on the MCBSTM32, and then how those map with respect to your board. Use this as a checklist of differences you will need to address.

How ''hard'' that is, will clearly depend on how many things you've changed from the reference design, and how that's spread through affected files.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
stst9189
Associate II
Posted on May 25, 2012 at 10:15

Well I manged to get this software running on the MCBSTM32. It was as I thought much harder than it should have been. I found a couple of issues too.

1) If you switch the project to run at 48MHz it does not work as the code does not set the USB divider up correctly. This should be fixed by ST in a future release.

2) In the VirtualCOMPort project on line 34 the comment has the wrong PID number with two digits transposed.

To me the documentation is also lacking in

A) How to port to another Dev Board/ Target Hardware

B) What you need to do to change the descriptors / inf file/ VID/ PID to your own ones.

Why not add other development boards to the Application note and make peoples life easier?

Lets hope ST read this and take these constructive ideas on board for the next version of UM0424.
rluck1
Associate II
Posted on May 25, 2012 at 17:13

FordP-

You had more fortitude than I did.  I tried doing the exact same thing (porting the ST VCOM code to an MCBSTM32 board) and I eventually gave up.  I am using Keil uVision 4.  It was WAY too difficult.  I wanted to use the MCBSTM32 because I wanted my end application product to use the 64 pin part instead of the 144 pin part.  And any comments about where things needed to be modified were entirely missing as far as I can tell.  Very cryptic.  I did get the ST VCOM stuff to work with a loaner STM3210E-EVAL, but as you point out, the board type is DEEPLY embedded into the code.  Unless you have a total grasp of all the different board options, chip options, pin options, clock options, and the contents of the numerous different C and H files and their functions, this porting task is monumental.

I found the same issues to be true with the various USB HID code examples by the way.  I fairly quickly got Keil's HID example for the MCBSTM32 board to work with their Windows host code.  But unless you are both a USB expert and an STM32 expert, all their code is also hard to follow and minimally commented as well.  By trial and error and endless searching through the Keil user forum, I managed to figure out where to put all the changes that were needed to get that HID application to transmit and receive more than one byte at a time.  The code is way too cryptic, what are they trying to hide?  Example code should be commented better than this so that a person not intimate with the details can quickly see the forest from the trees.  And places that could be modified should be boldly commented in an obvious way.

I don't know why the creators of the various STM32 examples are so sparse with their comments.  And there is basically nothing to explain the top level why and how everything fits together in the examples.  I think ST (and Keil) should take a look at the example code that Microchip creates.  Easy to follow, well commented, and easy to modify for your end application.  I've briefly looked at the TI Stellaris examples and they also seem to be well documented.  Example code should be there for teaching purposes.  And it should make my job easier, not harder.  ST, are you listening?  I know you are a chip company, but if you are selling microcontrollers, you are also a software company.

jspika
Associate II
Posted on February 11, 2014 at 18:25

For people who are working with mcbstm32c and want to run Device MSC example : you only need change ports setting in stm3210c_eval.h and stm3210c_eval.c