-
Notifications
You must be signed in to change notification settings - Fork 143
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
Add STM32H7 support #652
Add STM32H7 support #652
Conversation
832edc6
to
a90b038
Compare
5fe2c70
to
908f8f9
Compare
908f8f9
to
3eb9420
Compare
288cc45
to
0c70400
Compare
I have tested this on a Nucleo H723ZG and am trying to get the PLL to work. The RCC PLL implementation is not correct, but I expect to have a fix soon. The LED is blinking already at the right rate and I have uart output. I am currently adding settings for the APB3/4 prescaler. The flash latency data is also not correct yet. For higher CPU frequencies the assertion always triggers that the frequency was not supported. And I get an assertion from the systick driver: "HLCK is too fast for the SysTick to run at 4Hz" |
Please wait, I've already fixed a bunch of stuff incl. inside modm-devices. The RCC implementation isn't from me and it's completely wrong for the PLL at least for my H743. |
Yes, the fractional 32x32=64 multiplication overflows at ~536MHz and the H723 is running at 550MHz… When I implemented that the H7 only had the 480MHz devices… grrr |
0c70400
to
fce5364
Compare
I've pushed my fixes, but haven't tested the PLL config yet. Just so you're synced up. |
Thanks, I will look into it tomorrow. I noticed that in the H743 BSP the Apb* clocks are 240 MHz, the maximum is 120 MHz. |
fffc1b2
to
1df923a
Compare
Yup, had to look into the datasheet for that. ST's docs are a little crappy… I can get my H743 up to 240MHz, so the PLL implementation is correct, however the µC crashes when I try 480MHz. I suspect my |
Yes, same for me. Around 300 MHz was the maximum with default power settings. I could get the H723 to run at 500 MHz with:
It still hangs at 550 MHz. The overdrive bit does not exist for the H723. I found a mistake in the RCC implementation, the Apb3 prescaler setting in the RCC driver configures the Apb4 prescaler: The setting for Apb3 is in the D1 clock domain configuration register:
|
Oops, thanks! I'll fix it.
Ah, the internet said something about running from LDO, I'll check that. I found this horror story: Migration from RevY to RevV for STM32H743/753 and STM32H750 Value line microcontrollers |
Ok, then I'll put the LDO stuff into |
783e9a8
to
06b0b3c
Compare
06b0b3c
to
b1d519a
Compare
I made the mistake of looking into the Cortex-M7 Technical Reference Manual to figure out how the memory mapping works and thus tuned the linkerscripts again. I also added extensive documentation for STM32 and SAM. |
ab0d7f8
to
1620d5f
Compare
Add user-replaceable function modm_initialize_platform() called from the reset handler. It will be executed after enabling internal memories but before any memory initialization.
- Adds a generic linkerscript for all basic Cortex-M devices. - Adds .data_{ram} and .noinit_{ram} sections to all memories. - Uses MAX() to forward the heap location counter so that a very large .data section will collapse the heap to zero and "spill" into the next RAM section without overflowing the subsection SRAM1. - Generalizes RAM heap section placement via macro.
Co-authored-by: Christopher Durand <[email protected]> Co-authored-by: Elias Rosch <[email protected]>
1620d5f
to
80ed738
Compare
This again… LeSigh™ |
Felt cute might merge later.
I'm testing in hardware on NUCLEO-H743ZI, which boots with a 64MHz HSI, so that's pretty fast.
Depends on modm-io/modm-devices#63.