-
Notifications
You must be signed in to change notification settings - Fork 182
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
Support for connectivity line devices (stm32f105 and stm32f107) #205
Conversation
LGTM |
I found one last issue when building for the existing targets. Is there a better way to fix this than adding yet another |
|
Thanks for the PR, looks good to me. I wonder if the recent version bump to stm32-rs (#206) will have fixed that unused unsafe thing. If not, I'd say we should put a comment explaining why it is there. |
This is because f105/107 have less than 16 levels for |
Ah alright, I guess a comment is appropriate then |
Great work! I'm very curious how you managed to work out the settings for the PLLs and dividers for the user-requested Hz, since there's so many degrees of freedom and possible combinations on the 107. |
Rua you raised a very good point! |
Clock config is very different on the 107, see #109. |
@Rua Yes it is different and even ST themselves got it wrong for quite a while... zephyrproject-rtos/zephyr#9300 |
stm32f105/107 only allow PLLMUL values 4..=9 |
The trickier part is getting the frequencies right if you want to use Ethernet and USB. Anyway this needs a rebase to get rid of the merge conflicts. Probably easiest if you run |
Those are known as “Connectivity line" and have a peripheral configuration similar to the stm32f103 high-density devices but feature a USB OTG FS peripheral. stm32f107xx devices additionally have an ethernet controller. The connectivity line devices support less PLL multiplier values. A second PLL can be cascaded to achieve greater flexibility. This patch just does not add support for the second PLL but makes sure the values for PLL1 stay in the allowed range. A user should check if the requested clock rate could be configured by looking at the return value of `freeze()`
e69c775
to
5beed6a
Compare
Squashed and rebased |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM for a first shot. Let's land this and take it from there.
This PR adds support for the
stm32f105xx
andstm32f107xx
devices which are also knows as connectivity line.They have a peripheral configuration similar to the stm32f103 high-density devices but feature USB OTG FS peripheral and the stm32f107xx devices additionally have an ethernet controller.
Both share a common SVD file with the name stm32f107. I introduced the
connectivity
cargo feature to always cover both devices. Theconnectivity
feature replaces all previously abandonedstm32f107
andstm32f105
features in configuration attributes.I could blink a LED on a STM32F105 board with a crystal oscillator. No other tests were run on real hardware.
Please have a look and let me know if I missed something and what can be improved.