-
Notifications
You must be signed in to change notification settings - Fork 1k
Add generic F446Rx pinout #877
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
Conversation
This pinout is formatted the same way as the Generic F401Rx and F411Rx pinout, and is used with the STM32F446RC and STM32F446RE chips
447c33d
to
4ad0860
Compare
FMP TWI is not supported by this core anyways
Now the main clock is running at 180 MHz. The USB peripheral is also ready to be used since a 48 MHz clock is set up too. This clock config will expect an 8 MHz external clock or crystal (HSE). If not present, it will automatically switch to its internal clock (HSI).
As a note, I'm using CubeMX's clock config tool together with some of the mbed F446Rx source files to determine the right settings. I've also tested the internal and the external oscillator option on my Nucleo F446RE board |
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.
AStyle failed
--- a/variants/Generic_F446Rx/variant.cpp
+++ b/variants/Generic_F446Rx/variant.cpp
@@ -154,9 +154,9 @@ static uint8_t SetSysClock_PLL_HSE(uint8_t bypass)
}
// Activate the OverDrive to reach the 180 MHz Frequency
- if (HAL_PWREx_EnableOverDrive() != HAL_OK) {
- return 0; // FAIL
- }
+ if (HAL_PWREx_EnableOverDrive() != HAL_OK) {
+ return 0; // FAIL
+ }
// Select PLLSAI output as USB clock source
PeriphClkInitStruct.PLLSAI.PLLSAIM = 8;
@@ -219,7 +219,7 @@ uint8_t SetSysClock_PLL_HSI(void)
// Activate the OverDrive to reach the 180 MHz Frequency
if (HAL_PWREx_EnableOverDrive() != HAL_OK) {
- return 0; // FAIL
+ return 0; // FAIL
}
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.
You missed one astyle issue
--- a/variants/Generic_F446Rx/variant.cpp
+++ b/variants/Generic_F446Rx/variant.cpp
@@ -154,9 +154,9 @@ static uint8_t SetSysClock_PLL_HSE(uint8_t bypass)
}
// Activate the OverDrive to reach the 180 MHz Frequency
- if (HAL_PWREx_EnableOverDrive() != HAL_OK) {
- return 0; // FAIL
- }
+ if (HAL_PWREx_EnableOverDrive() != HAL_OK) {
+ return 0; // FAIL
+ }
178d655
to
80ac35c
Compare
Since HSE_VALUE can be redefined at compile time, this value also needs to take this into account
Layout wise this pinout is more or less identical with
Genric_F401Rx
andGeneric F411Rx
, but of course designed to work with the F446Rx series.