Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add STM32F042K6Ux Variants#2648

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
fpistm merged 11 commits intostm32duino:mainfromjackb60:main
Feb 4, 2025
Merged

Add STM32F042K6Ux Variants#2648

fpistm merged 11 commits intostm32duino:mainfromjackb60:main
Feb 4, 2025

Conversation

jackb60
Copy link
Contributor

@jackb60jackb60 commentedFeb 3, 2025
edited
Loading

No description provided.

Signed-off-by: jackb60 <40903548+jackb60@users.noreply.github.com>
Signed-off-by: jackb60 <40903548+jackb60@users.noreply.github.com>
Signed-off-by: jackb60 <40903548+jackb60@users.noreply.github.com>
Signed-off-by: jackb60 <40903548+jackb60@users.noreply.github.com>
Signed-off-by: jackb60 <40903548+jackb60@users.noreply.github.com>
Signed-off-by: jackb60 <40903548+jackb60@users.noreply.github.com>
Signed-off-by: jackb60 <40903548+jackb60@users.noreply.github.com>
@jackb60jackb60 changed the titleAdd STM32F042K6Ux SupportAdd STM32F042K6Ux VariantsFeb 3, 2025
@fpistmfpistm added the new variantAdd support of new bard labelFeb 3, 2025
Copy link
Member

@fpistmfpistm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Thanks@jackb60 for the PR.
One small change else it's LGTM.

@fpistmfpistm added this to the2.10.0 milestoneFeb 3, 2025
Signed-off-by: jackb60 <40903548+jackb60@users.noreply.github.com>
@jackb60
Copy link
ContributorAuthor

Fixed

fpistm reacted with thumbs up emojifpistm reacted with rocket emoji

Copy link
Member

@fpistmfpistm left a comment
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Please fix the astyle issue:

diff --git a/variants/STM32F0xx/F042K(4-6)U/generic_clock.c b/variants/STM32F0xx/F042K(4-6)U/generic_clock.cindex a5ac5e2..021aaf1 100644--- a/variants/STM32F0xx/F042K(4-6)U/generic_clock.c+++ b/variants/STM32F0xx/F042K(4-6)U/generic_clock.c@@ -27,36 +27,33 @@ WEAK void SystemClock_Config(void)   /** Initializes the RCC Oscillators according to the specified parameters   * in the RCC_OscInitTypeDef structure.   */-  RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI|RCC_OSCILLATORTYPE_HSI48+  RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI | RCC_OSCILLATORTYPE_HSI48;   RCC_OscInitStruct.HSIState = RCC_HSI_ON;   RCC_OscInitStruct.HSI48State = RCC_HSI48_ON;   RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT;   RCC_OscInitStruct.PLL.PLLState = RCC_PLL_NONE;-  if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)-  {+  if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) {     Error_Handler();   }    /** Initializes the CPU, AHB and APB buses clocks   */-  RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK-                              |RCC_CLOCKTYPE_PCLK1;+  RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_SYSCLK+                                | RCC_CLOCKTYPE_PCLK1;   RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_HSI48;   RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;   RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1;-  if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_1) != HAL_OK)-  {+  if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_1) != HAL_OK) {     Error_Handler();   }-  PeriphClkInit.PeriphClockSelection = RCC_PERIPHCLK_USB|RCC_PERIPHCLK_USART1-                              |RCC_PERIPHCLK_I2C1;+  PeriphClkInit.PeriphClockSelection = RCC_PERIPHCLK_USB | RCC_PERIPHCLK_USART1+                                       | RCC_PERIPHCLK_I2C1;   PeriphClkInit.Usart1ClockSelection = RCC_USART1CLKSOURCE_PCLK1;   PeriphClkInit.I2c1ClockSelection = RCC_I2C1CLKSOURCE_HSI;   PeriphClkInit.UsbClockSelection = RCC_USBCLKSOURCE_HSI48;-  if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInit) != HAL_OK)-  {+  if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInit) != HAL_OK) {     Error_Handler();   } }

Signed-off-by: jackb60 <40903548+jackb60@users.noreply.github.com>
@jackb60jackb60 requested a review fromfpistmFebruary 3, 2025 14:47
Copy link
Member

@fpistmfpistm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Still issues with astyle:

--- a/variants/STM32F0xx/F042K(4-6)U/generic_clock.c+++ b/variants/STM32F0xx/F042K(4-6)U/generic_clock.c@@ -38,8 +38,8 @@ WEAK void SystemClock_Config(void)    /** Initializes the CPU, AHB and APB buses clocks   */-RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_SYSCLK-                              | RCC_CLOCKTYPE_PCLK1;+  RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_SYSCLK+                                | RCC_CLOCKTYPE_PCLK1;   RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_HSI48;   RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;   RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1;@@ -47,8 +47,8 @@ RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_SYSCLK   if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_1) != HAL_OK) {     Error_Handler();   }-PeriphClkInit.PeriphClockSelection = RCC_PERIPHCLK_USB | RCC_PERIPHCLK_USART1-                                     | RCC_PERIPHCLK_I2C1;+  PeriphClkInit.PeriphClockSelection = RCC_PERIPHCLK_USB | RCC_PERIPHCLK_USART1+                                       | RCC_PERIPHCLK_I2C1;   PeriphClkInit.Usart1ClockSelection = RCC_USART1CLKSOURCE_PCLK1;   PeriphClkInit.I2c1ClockSelection = RCC_I2C1CLKSOURCE_HSI;   PeriphClkInit.UsbClockSelection = RCC_USBCLKSOURCE_HSI48;

Signed-off-by: jackb60 <40903548+jackb60@users.noreply.github.com>
@jackb60jackb60 requested a review fromfpistmFebruary 3, 2025 15:10
@fpistmfpistm merged commitee9c0dd intostm32duino:mainFeb 4, 2025
24 of 25 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@fpistmfpistmfpistm approved these changes

Assignees
No one assigned
Labels
new variantAdd support of new bard
Projects
Milestone
2.10.0
Development

Successfully merging this pull request may close these issues.

2 participants
@jackb60@fpistm

[8]ページ先頭

©2009-2025 Movatter.jp