2014-04-01 03:59 AM
Hello,
STM32L1 microcontrollers are having USB peripheral. But unfortunatelySTM32L1xx Standard Peripherals library from ST does not include a sample project for USB. The library includes a rich set of sample files for most other units. Can some body points me out a good sample project to start with STM32L1 USB?
Thanks. #stm32l151-usb2014-04-01 06:42 AM
Hi
''Can some body points me out a good sample project to start with STM32L1 USB?
'' http://www.st.com/web/en/catalog/tools/FM147/CL1794/SC961/SS1743/PF258157?s_searchtype=keyword I believe ST are stopping support for the Peripheral Libraries in favour of the STM32Cube http://www.st.com/web/en/catalog/tools/FM147/CL1794/SC961/SS1533/PF259242?icmp=pf259242_prom_stm32cube-long-promo_feb2014 I do not anything about this new cube software - I have not tried it yet.2014-04-02 08:42 AM
> But unfortunately STM32L1xx Standard Peripherals library from ST does not include a sample project for USB.
This library is still there on the ST site. STSW-STM32121 STM32F10x, STM32L1xx and STM32F3xx USB full speed device library (UM0424) Tsuneo2014-12-21 08:14 PM
Hi,
Tsuneo & Everyone,
Is the USB function of STM32L15x workable?Because I bought the both ST Nucleo L152RE board and STM32 L1 Discovery board,there are no USB connector.I need the composite device function (HID and virtual com port). and I fear the L1 can't support USB function.Thank you.BRchengyi2014-12-22 07:59 AM
I fear the L1 can't support USB function.
Have you looked at the board? Review the design documents for that, and determine how you can replicate the connectivity on the boards you bought without USB hardware attached. STM32_USB-FS-Device_Lib_V4.0.0\Utilities\STM32_EVAL\STM32L152_EVAL2014-12-23 01:23 AM
Dear clive
Thank you for the reply. I got it.By the way, May I ask if I need to switch the clock source between HSI & HSE when MCU working.Is it possible? Because in the application, the HSE clock source need set by MCU, so I need start MCU with HSI RC source, to enable HSE clock source, then switch to HSE clock source.And maybe also need to switch clock source from HSE to HSI for saving power.Is it workable? Thanks a lot!Best regards,Chengyi2014-12-23 06:32 AM
Yes, you can change clock sources on the fly, how complicated that gets depends on what you're using and what you want to go to.
For a PLL speed changed you'd need to switch the processor to a different enabled/ready clock, then disable the PLL, reconfigure it, wait for it to lock, then switch back to the PLL source, and then wait for it to be selected. You also need to make sure flash wait states, and other APB/AHB settings are valid for the speeds you are switching too, and do it before/after the change depending on if they need to be faster/slower. Not sure if HSI uses less energy than HSE.