Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added rcc_hsi16_div4() and rcc_set_pll_source() for stm32l0 (tested) #609

Closed
wants to merge 1 commit into from
Closed

Conversation

kaeipnos
Copy link

I started to use libopencm3 for a small project with an nucleo-L053R8 board, but It seems that some key functions were missing ( hsi16 divider and pll source switch ).
Of course those functions are trivial to implement but it makes source code a bit more readable.
It seems that stm32l0 targets aren't well supported.

I've also started a miniblink example for this board that uses those functions, and if you think it can be useful I can make another pull request on libopencm3-examples when it's ready.

@karlp
Copy link
Member

karlp commented Jan 31, 2016

Correct, L0 support is very new

@@ -160,6 +160,8 @@
#define RCC_CFGR_PLLMUL_MASK 0xf

/* PLLSRC: PLL entry clock source */
#define RCC_CFGR_PLLSRC_SHIFT 16
#define RCC_CFGR_PLLSRC_MASK (1 << RCC_CFGR_PLLSRC_SHIFT)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need for mask and shift definitions for single bits.

karlp added a commit to karlp/libopencm3 that referenced this pull request Feb 24, 2018
karlp added a commit that referenced this pull request Mar 2, 2018
@karlp
Copy link
Member

karlp commented Mar 2, 2018

pll source has landed, if people still want the div4 support we can make a new PR for that.

@karlp karlp closed this Mar 2, 2018
BOJIT pushed a commit to BOJIT/PlatformIO-libopencm3 that referenced this pull request Jan 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants