Skip to content

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

Merged
merged 6 commits into from
Feb 3, 2020
Merged

Conversation

MCUdude
Copy link
Contributor

@MCUdude MCUdude commented Jan 20, 2020

Layout wise this pinout is more or less identical with Genric_F401Rx and Generic F411Rx, but of course designed to work with the F446Rx series.

This pinout is formatted the same way as the Generic F401Rx and F411Rx pinout, and is used with the STM32F446RC and STM32F446RE chips
@fpistm fpistm self-requested a review January 28, 2020 09:13
@fpistm fpistm added the new variant Add support of new bard label Jan 28, 2020
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).
@MCUdude
Copy link
Contributor Author

MCUdude commented Jan 31, 2020

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

Copy link
Member

@fpistm fpistm left a 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
   }

@fpistm fpistm added this to the 1.9.0 milestone Jan 31, 2020
@fpistm fpistm self-requested a review January 31, 2020 15:05
Copy link
Member

@fpistm fpistm left a 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
+  }

 Since HSE_VALUE can be redefined at compile time, this value also needs to take this into account
@fpistm fpistm merged commit ccb9656 into stm32duino:master Feb 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new variant Add support of new bard
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants