2015-05-15 07:52 AM
Hi all,
Throughout my time programming STM32 microcontrollers, I've used the standard peripheral libraries. Having recently designed my latest product around the STM32L051K8, I thought there would be a standard peripheral library for this too. I've tried searching but can't seem to find one anywhere and everything is pointing me towards using STM32Cube.So I've downloaded STM32CubeMX but it currently seems really limiting for my application. I've developed my application on the STM32F051 (hoping the code would be relatively easily ported) and I need the ability to do things like change the SPI data size on the fly etc. I could realistically program everything in low-level register form but since I've already got everything programmed using the standard peripheral library, it seems a waste of my time to start over.Where can I find/port the standard peripheral library for the STM32L051K8? #stm32l051k8-standard-peripheral2015-05-15 08:28 AM
> Where can I find/port the standard peripheral library for the STM32L051K8?
Nowhere. https://my.st.com/public/STe2ecommunities/mcu/Lists/STM32Java/Flat.aspx?RootFolder=%2Fpublic%2FSTe2ecommunities%2Fmcu%2FLists%2FSTM32Java%2FSTM32L053%20Standard%20Peripheral%20Library&FolderCTID=0x01200200770978C69A1141439FE559EB459D758000F9A0E3A95BA69146A17C2E80209ADC21¤tviews=768 ST declared the discontinuation of SPL in favour of Cube quite some time ago. The L0 family fell victim as the first. >I could realistically program everything in low-level register form but since I've already got everything programmed using the standard peripheral library, it seems a waste of my time to start over. There are problably only timewasting options available for you: 1. Go for the registers. Many SPL functions map into them directly, and most peripherals are identical or downward-compatible between families, so it should be not that hard to go for it. It's a change in style and attitude, I admit, and that may be a burden. 2. Go for Cube. I personally wouldn't touch it with a stick, but that's me, YMMV. 3. Write your own L0 SPL. You don't need the whole shebang, do you. Again, the peripherals tend to be pretty similar, so it shouldn't be that hard either. In case you go for 3, I'd like to ask you to share the result, if you are in position you can do it. Thanks. JW2015-05-15 09:26 AM
Also, if you choose the option of going low-level, the
http://www.st.com/web/catalog/tools/FM147/CL1794/SC961/SS1743/LN1898/PF260788
can be of help.