Skip to main content
Visitor II
January 19, 2023
Question

Setting Up STM32L452 as USB CDC Device with VBUS-Sense

  • January 19, 2023
  • 3 replies
  • 1381 views

I'm working on a setup with a STM32L452RE and want to use the USB as a CDC-Device. I want to use the internal PullUp for D+ and the VBUS-sensing. I only find very unspecific Information about what i got to do in software.

Also which Pin to use (probably PA9) but i don't find any information about this in the reference manual or other documentation for the STM32L452.

    This topic has been closed for replies.

    3 replies

    Graduate
    January 19, 2023

    See the datasheet, AF tables. Still, I can't see too many reasons for VBUS sensing. If you turn on VBUS sensing in CubeMX, it will assign a proper pin for it automatically.

    TFels.1Author
    Visitor II
    January 19, 2023

    In the AF-Tabels in datasheet i can not find any info for VBUS-Sensing. Wheter at Port PA9 nor any other.

    I can not find any configruations for VBUS sensing in CubeMX. I'm using CubeMX inside CudeIDE. Where to find this settings?

    0693W00000Y8dLjQAJ.png 

    Technical Moderator
    January 19, 2023

    Hi @TFels.1​ ,

    Please refer to the 2 following resources:

    Was suggested content helpful? If not, please let me know if you don't find the answer to your request and tell me what is missing.

    -Amel

    TFels.1Author
    Visitor II
    January 19, 2023

    Hi,

    is it correct that i only need to connect the PIN PA9 to the voltagedivider mentioned in the AN 4879 and i'm done? Nothing else to configure but PA9 as Input?

    That would be really simple.