-
-
Notifications
You must be signed in to change notification settings - Fork 39.9k
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
Bring supported STM32F4 configs in line with F4x1 #24413
Conversation
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.
In general this should be good, but the required LD files are present only for the STM32F405xG
case; for other chips we currently don't reserve the second 16K flash sector for the EEPROM backing store, and don't have a proper LD file for the tinyuf2 bootloader.
gonna have to read up more on the memory usage and locations. |
Co-authored-by: Sergey Vlasov <[email protected]>
Tested with weact g474ce board. However, the weact f446 has a different config (?) that I'm not sure how to configure for. |
The major problem with F446 is that there is no EFL support for that chip in ChibiOS. |
As for the config for the WeAct F446 board, the only change from |
Thanks. I figured that it was something simple that I was missing.... And can confirm that these changes work on f446, as well, now. |
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.
This code by itself looks correct, and seems to work. The remaining issues are mostly at the ChibiOS level, so outside of the scope of this PR:
- EFL support for STM32F446 is not implemented in ChibiOS at all.
- EFL support for STM32F405/F407 is incomplete (512K chips are supported only in the
master
branch at the moment, so the firmware will halt on EFL init). - During the first startup after flashing the firmware QMK erases the backing store, and the delay caused by that erase triggers some bugs in the USB OTG controller. On F405 (and probably F407) that results in a long delay before the USB enumeration finally goes through; on F446 (and maybe even F405/F407 if using USB HS instead of FS) the USB controller does not seem to recover from that state without a full hardware reset.
Co-authored-by: Sergey Vlasov <[email protected]>
Co-authored-by: Sergey Vlasov <[email protected]>
Co-authored-by: Sergey Vlasov <[email protected]>
Co-authored-by: Sergey Vlasov <[email protected]>
Co-authored-by: Sergey Vlasov <[email protected]>
Description
The F405, F407, and F446 models use the same weird flash page layout as the F4x1 chips (multiple 16k pages at the beginning). This aligns with the other F4 controllers' following suit.
Verified in the reference manuals for the F405/F407 and F446 that these layouts are correct.
Have tested on the F405RG1, F407VE F44612 and G474CE
Types of Changes
Issues Fixed or Closed by This PR
I created an 870kb firmware for the F405RG (1MB) that soft-bricked. Talking with tzarc, that does run into the currently configured wear leveling area. F4's use a weird layout, which we should take advantage of.
Checklist
Footnotes
long delay for USB enumeration after initial flash ↩ ↩2
F446 officially has no EFL support in chibiOS. A quick hack to enable the same specs as f411 works. Similar with F407xE ↩