-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add ST files for mcu stm32wba52cx (#315)
Add new files for mcu stm32wba52cx Co-authored-by: Richard Peters <[email protected]>
- Loading branch information
1 parent
8144afa
commit f545781
Showing
299 changed files
with
343,564 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
#include DEVICE_HEADER | ||
#include "hal_st/stm32fxxx/DefaultClockNucleoWBA52CG.hpp" | ||
|
||
/* The system Clock is configured as follows: | ||
* System Clock source = PLL (HSE) | ||
* SYSCLK(Hz) = 100000000 | ||
* HCLK(Hz) = 100000000 | ||
* AHB Prescaler = 1 | ||
* APB1 Prescaler = 1 | ||
* APB2 Prescaler = 1 | ||
* APB7 Prescaler = 1 | ||
* HSE Frequency(Hz) = 32000000 | ||
* PLL_M = 4 | ||
* PLL_N = 25 | ||
* PLL_P = 2 | ||
* PLL_Q = 1 | ||
* PLL_R = 2 | ||
* Flash Latency(WS) = 4 | ||
*/ | ||
void ConfigureDefaultClockNucleoWBA52CG() | ||
{ | ||
RCC_OscInitTypeDef RCC_OscInitStruct = { 0 }; | ||
RCC_ClkInitTypeDef RCC_ClkInitStruct = { 0 }; | ||
|
||
__HAL_RCC_PWR_CLK_ENABLE(); | ||
|
||
HAL_PWREx_ControlVoltageScaling(PWR_REGULATOR_VOLTAGE_SCALE1); | ||
|
||
/* Activate PLL with HSE as source */ | ||
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE; | ||
RCC_OscInitStruct.HSEState = RCC_HSE_ON; | ||
RCC_OscInitStruct.PLL1.PLLState = RCC_PLL_ON; | ||
RCC_OscInitStruct.PLL1.PLLSource = RCC_PLLSOURCE_HSE; | ||
RCC_OscInitStruct.PLL1.PLLFractional = 0; | ||
RCC_OscInitStruct.PLL1.PLLM = 4; | ||
RCC_OscInitStruct.PLL1.PLLN = 25; /* VCO = HSE/M * N = 32 / 4 * 25 = 200 MHz */ | ||
RCC_OscInitStruct.PLL1.PLLR = 2; /* PLLSYS = 200 MHz / 2 = 100 MHz */ | ||
RCC_OscInitStruct.PLL1.PLLP = 2; | ||
RCC_OscInitStruct.PLL1.PLLQ = 1; | ||
HAL_RCC_OscConfig(&RCC_OscInitStruct); | ||
|
||
/* Select PLL as system clock source and configure the HCLK, PCLK1, PCLK2 and PCLK7 | ||
clocks dividers */ | ||
RCC_ClkInitStruct.ClockType = (RCC_CLOCKTYPE_SYSCLK | RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_PCLK1 | | ||
RCC_CLOCKTYPE_PCLK2 | RCC_CLOCKTYPE_PCLK7); | ||
RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK; | ||
RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1; | ||
RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1; | ||
RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1; | ||
RCC_ClkInitStruct.APB7CLKDivider = RCC_HCLK_DIV1; | ||
HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_4); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#ifndef HAL_ST_DEFAULT_CLOCK_HPP | ||
#define HAL_ST_DEFAULT_CLOCK_HPP | ||
|
||
void ConfigureDefaultClockNucleoWBA52CG(); | ||
|
||
#endif |
2,826 changes: 2,826 additions & 0 deletions
2,826
hal_st/stm32fxxx/ip/GPIO-STM32WBA52x_gpio_v1_0_Modes.xml
Large diffs are not rendered by default.
Oops, something went wrong.
2,903 changes: 2,903 additions & 0 deletions
2,903
hal_st/stm32fxxx/ip/GPIO-STM32WBAx_gpio_v1_0_Modes.xml
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.