[Cryptech-Commits] [sw/stm32] 10/12: found paul is setting up HSE in TARGET_CRYPTECH_ALPHA
git at cryptech.is
git at cryptech.is
Mon May 16 09:43:23 UTC 2016
This is an automated email from the git hooks/post-receive script.
fredrik at thulin.net pushed a commit to branch ft-alpha_board_bringup
in repository sw/stm32.
commit 5d5fe691b454abccb42b4b7c0d0bc0c3c14f2e0f
Author: Fredrik Thulin <fredrik at thulin.net>
AuthorDate: Sat May 14 16:07:50 2016 +0200
found paul is setting up HSE in TARGET_CRYPTECH_ALPHA
---
stm-init.c | 42 ------------------------------------------
stm-init.h | 2 --
2 files changed, 44 deletions(-)
diff --git a/stm-init.c b/stm-init.c
index efcc025..f82ed16 100644
--- a/stm-init.c
+++ b/stm-init.c
@@ -48,9 +48,6 @@
/* Private variables ---------------------------------------------------------*/
/* Private function prototypes -----------------------------------------------*/
-#ifdef CRYPTECH_USE_HSE_CLOCK
-static void SystemClock_Config(void);
-#endif
#ifdef HAL_GPIO_MODULE_ENABLED
static void MX_GPIO_Init(void);
#endif
@@ -64,10 +61,6 @@ void stm_init(void)
/* MCU Configuration----------------------------------------------------------*/
-#ifdef CRYPTECH_USE_HSE_CLOCK
- SystemClock_Config();
-#endif
-
/* System interrupt init*/
/* Sets the priority grouping field */
HAL_NVIC_SetPriorityGrouping(NVIC_PRIORITYGROUP_0);
@@ -83,41 +76,6 @@ void stm_init(void)
#endif
}
-#ifdef CRYPTECH_USE_HSE_CLOCK
-/** System Clock Configuration
- *
- * HSE crystal at 25 MHz, end result is 180 MHz clock.
- */
-void SystemClock_Config(void)
-{
- RCC_ClkInitTypeDef RCC_ClkInitStruct;
- RCC_OscInitTypeDef RCC_OscInitStruct;
-
- __PWR_CLK_ENABLE();
-
- __HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1);
-
- RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE;
- RCC_OscInitStruct.HSEState = RCC_HSE_ON;
- RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
- RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE;
- RCC_OscInitStruct.PLL.PLLM = 25;
- RCC_OscInitStruct.PLL.PLLN = 360;
- RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV2;
- RCC_OscInitStruct.PLL.PLLQ = 4;
- HAL_RCC_OscConfig(&RCC_OscInitStruct);
-
- HAL_PWREx_ActivateOverDrive();
-
- RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_SYSCLK | RCC_CLOCKTYPE_PCLK1 | RCC_CLOCKTYPE_PCLK2;
- RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
- RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
- RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV4;
- RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV2;
- HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_5);
-}
-#endif
-
#ifdef HAL_UART_MODULE_ENABLED
/* USART1 init function */
diff --git a/stm-init.h b/stm-init.h
index 489a2c6..ed80d01 100644
--- a/stm-init.h
+++ b/stm-init.h
@@ -43,6 +43,4 @@ extern void Error_Handler(void);
#define HAL_Delay osDelay
-#define CRYPTECH_USE_HSE_CLOCK
-
#endif /* __STM_INIT_H */
More information about the Commits
mailing list