Skip to main content
Sunny T
Visitor II
September 4, 2017
Question

STM32L476 Discovery USB CDC Class Source code or Example

  • September 4, 2017
  • 2 replies
  • 2808 views
Posted on September 04, 2017 at 16:24

Hi,

      I am using STM32L476 Discovery Board, as part of my project i need to enable USB OTG Port as CD C Class. Could some one help me in fining any example for USB OTG CDC Class for STM32L476 Discovery Board. I found an example for STM32L476 Eval board Can i use the same Application Example for Discovery Board also. Please help me out in finding the solution.

    This topic has been closed for replies.

    2 replies

    Technical Moderator
    September 4, 2017
    Posted on September 04, 2017 at 16:49

    Hello,

    You can port the CDC example for STM32L476G_EVAL, get inspired from this working application, change the pins and modify the example depending on your needs.

    You can also use the STM32CubeMX tool to initialize peripherals, build and generate your starting project.

    For more details, refer to

    /external-link.jspa?url=http%3A%2F%2Fwww.st.com%2Fcontent%2Fccc%2Fresource%2Ftechnical%2Fdocument%2Fuser_manual%2Fcf%2F38%2Fe5%2Fb5%2Fdd%2F1d%2F4c%2F09%2FDM00108pdf%2Ffiles%2FDM00108pdf%2Fjcr%3Acontent%2Ftranslations%2Fen.DM00108pdf

    that explains more the use of STM32Cube USB device library.

    Best Regards

    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
    JPort.17
    Visitor II
    January 28, 2019

    Hi, could you clarify where the "the CDC example for STM32L476G_EVAL" can be found. I tried all the links above and got "page not found" for all. Thanks

    Technical Moderator
    January 28, 2019

    Hello,

    The CDC example is available under the STM32CubeL4 firmware package (to download from ST web site or STM32CubeMx tool):

    STM32Cube_FW_L4_V1.13.0\Projects\STM32L476G-EVAL\Applications\USB_Device\CDC_Standalone

    Kind Regards,

    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
    Szymon PANECKI
    Senior III
    September 6, 2017
    Posted on September 06, 2017 at 15:27

    Hello,

    Below please find attached a presentation, which shows step by step how to develop an USB VCP example application on STM32L4 Discovery kit. In addition I attached a project (for Keil IDE), which implements USB VCP application based on steps described in presentation.

    I hope it will be helpful to you.

    Regards

    Szymon

    ________________

    Attachments :

    STM32L4 Discovery USB VCP hands on.pdf : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HySo&d=%2Fa%2F0X0000000b83%2FruwYoZ0kJdFaq2Xl2Rl_Iv0bLLjyEDHwdv0IzPewarU&asPdf=false

    USB_VCP.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HySe&d=%2Fa%2F0X0000000b7v%2F.q1pP1RgQbDW0zXBRKXWXDP1XWigSGomqYMHymQC9H4&asPdf=false
    JPort.17
    Visitor II
    January 28, 2019

    Hi, I tried following the instructions in the presentation with the latest CubeMX 5.0.1, but when I got to Generate Code it popped up a message "These IPs still have some not configured or wrong parameter values [Clock]. Do you still want to generate code ?". Is that something that can be ignored for this example ? Thanks.

    Technical Moderator
    January 28, 2019

    Hi,

    You have to configure the clock before generate code.

    You can click on the "Resolve Clock Issues" button to resolve automatically your configuration issues .

    0690X000006DGVMQA4.pngKind Regards,

    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