Skip to main content
Manikandan K
Associate III
March 22, 2017
Question

Nucelo F207ZG USB CDC Example code

  • March 22, 2017
  • 20 replies
  • 3637 views
Posted on March 22, 2017 at 08:50

Hi, I'm using Nucleo F207ZG board and i did my testing of GPIO using STM32CubeMx(HAL lib) with Eclipse IDE on Ubuntu 04, Now i want to use the USB as Communication Device Class (CDC) but i'm not familiar with usb so is there any example coding for tranfer the data from/to Nucleo board/PC

Note: this post was migrated and contained many threaded conversations, some content may be missing.
    This topic has been closed for replies.

    20 replies

    ST Technical Moderator
    March 22, 2017
    Posted on March 22, 2017 at 09:30

    Hi,

    I suggest you to start from the '

    CDC_Standalone' 

    application

    in STM32CubeF2 firmware package

    provided within

    STM322xG_EVAL

     as an implementation example: 

    STM32Cube_FW_F2_V1.4.0\Projects\STM322xG_EVAL\Applications\USB_Device\CDC_Standalone

    I recommend you to check the 'STM32Cube USB device library' User manual UM1734. 

    Hope this help you.

    Imen

    In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks
    Manikandan K
    Associate III
    March 22, 2017
    Posted on March 22, 2017 at 09:56

    Thank you Imen ,

    One more question , Whether the sample program given in the STM322xG_EVAL  and STM32F207ZG-Nucleo both are applicable for Nucleo F207ZG board ? then what is the difference between both of the folders ?

    Manikandan

    Tesla DeLorean
    Guru
    March 22, 2017
    Posted on March 22, 2017 at 11:35

    Use diff or merge to see. 

    More generally the NUCLEO will have a subset of the EVAL board functionality, and frequently uses different pins, but the concepts are portable with minimal effort. 

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    Manikandan K
    Associate III
    March 22, 2017
    Posted on March 22, 2017 at 12:39

    Thank you for your kind reply ,

    I'm going to use Eclipse IDE and Ubuntu 16.04 , How i can see the output ?

    Is there any Eclipse plugin for serial terminal window or otherwise i want to use separate serial terminal like cutecom ?

    If i use cutecom means, whether i want to install STM32 Virtual COM Port Driver on Linux machine or or using usb-acm driver is enough ah ?

    How can i install STM32 Virtual COM Port Driver  on Ubuntu machine?

    Manikandan K
    Associate III
    March 27, 2017
    Posted on March 27, 2017 at 08:29

    Hi all,

    Finally i got solution for my doubt ,

    Actually what i did mistake means in STM32cubeMx i giving a input frequency as 25 Mhz, but in Nucleo F207ZG board only having 8 Mhz . Now i set  it as 8 Mhz and my USB_CDC(Virtual com port is working good in GtkTerm ),

    Now UART is not needed only UART communication through USB .

    For coding i refer to the webside 

    https://www.youtube.com/watch?v=Jpul3w10tOU

    Manikandan

    Pranay Dhuri
    Associate III
    May 22, 2017
    Posted on May 22, 2017 at 12:07

    Hi

    K.Manikandan

    ,

    I am also trying the same with STM32F207ZG nucleo board... and as you said i changed i/p clock to 8 MHz...but still i didn't get it working, It is not recognizing USB...can you suggest the steps that you followed to get it working...

    Thanks.

    Manikandan K
    Associate III
    May 22, 2017
    Posted on May 22, 2017 at 12:29

    Hi Pranay Dhuri,

    Can you tell me the procedure which you followed ,

    I did STM32F207ZG USB Communication with STM32cube and eclipse IDE . So if you share your procedure then it is easy to solve your problem. 

    -With Thanks & Regards

    K.Manikandan

    Manikandan K
    Associate III
    June 9, 2017
    Posted on June 09, 2017 at 15:26

    Hi ,

    USB receive class file only receive up to 18 byte properly (tested in the GTK Term tool) ,  I'm using receiving size as 64 only .

    Pls Any suggestion

    K.Manikandan