Skip to main content
Marco Ferdinandi
Associate
July 17, 2017
Solved

STM32CubeL0 - USB example for STM32L073RZ

  • July 17, 2017
  • 4 replies
  • 2132 views
Posted on July 17, 2017 at 16:17

Hi,

I'm developing a bridge USB-SPI with a STM32L052 microcontroller. In this starting moment I'm developing the same application using the evaluation board STM32L073RZ. I'm using SW4STM32 IDE and STM32CubeL0 software. I'm looking for an example based on USB usage, but I haven't found yet.

Is there the USB driver for STM32L073RZ in the STM32CubeL0?

Are there any examples based on the USB?

Thanks in advance,

Marco Ferdinandi
    This topic has been closed for replies.
    Best answer by Amel NASRI
    Posted on July 17, 2017 at 16:34

    Hi

    marco.ferdinandi@sensichips.com

    ‌,

    Look to the ones available underSTM32Cube_FW_L0_V1.9.0\Projects\STM32L073Z_EVAL\Applications\USB_Device.

    The device is the same (STM32L073), but you need to get rid of all BSP (board specific) code to run it in your own board.

    -Amel

    4 replies

    Amel NASRI
    Amel NASRIBest answer
    ST Technical Moderator
    July 17, 2017
    Posted on July 17, 2017 at 16:34

    Hi

    marco.ferdinandi@sensichips.com

    ‌,

    Look to the ones available underSTM32Cube_FW_L0_V1.9.0\Projects\STM32L073Z_EVAL\Applications\USB_Device.

    The device is the same (STM32L073), but you need to get rid of all BSP (board specific) code to run it in your own board.

    -Amel

    To give better visibility on the answered topics, please click on "Best Answer" on the reply which solved your issue or answered your question.
    Marco Ferdinandi
    Associate
    July 17, 2017
    Posted on July 17, 2017 at 16:58

    Hi

    st.mcu

    ,

    thanks for the answer. I've Imported the STM32L073Z_EVAL project and I have built it successfully. Now, what should I do in order to customize this cose for my specific board (STM32L073RZ Nucleo)? What do you mean with 'to get rid of all BSP'? Should I replace something?

    Thanks in advance.

    Marco

    Amel NASRI
    ST Technical Moderator
    July 17, 2017
    Posted on July 17, 2017 at 17:23

    The BSP code should be commented and the BSP related drivers have to be removed from the project to be used with the Nucleo.

    -Amel

    To give better visibility on the answered topics, please click on "Best Answer" on the reply which solved your issue or answered your question.
    Zt Liu
    Senior III
    July 18, 2017
    Posted on July 18, 2017 at 05:58

    hi, 

    you may also consider to use cubeMX to generate the whole project, just enable USB FS and Enable Virtual Com Port 

    stack. Then it' almost done!