Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: main.h
- Revision:
- 4:511677d804ac
- Parent:
- 0:a0c5877bd360
--- a/main.h Mon Jul 16 19:07:18 2018 +0000
+++ b/main.h Mon Jul 16 19:38:59 2018 +0000
@@ -60,7 +60,6 @@
{
RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};
RCC_OscInitTypeDef RCC_OscInitStruct = {0};
- RCC_PeriphCLKInitTypeDef PeriphClkInit;
// Enable HSI48 Oscillator for RNG analog part
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI48;
@@ -72,21 +71,6 @@
Error_Handler();
}
-// // Enable HSI Oscillator and Activate PLL with HSI as source
-// RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI;
-// RCC_OscInitStruct.HSEState = RCC_HSE_OFF;
-// RCC_OscInitStruct.HSIState = RCC_HSI_ON;
-// RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT;
-// RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
-// RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI;
-// RCC_OscInitStruct.PLL.PLLMUL = RCC_PLLMUL_6;
-// RCC_OscInitStruct.PLL.PLLDIV = RCC_PLLDIV_3;
-//
-// if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)
-// {
-// Error_Handler();
-// }
-
// Set Voltage scale1 as MCU will run at 32MHz
__HAL_RCC_PWR_CLK_ENABLE();
__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1);
@@ -104,16 +88,6 @@
{
Error_Handler();
}
-
-
-// // Select clock for both UART1 and UART2
-// PeriphClkInit.PeriphClockSelection = RCC_PERIPHCLK_USART2;
-// PeriphClkInit.Usart2ClockSelection = RCC_USART2CLKSOURCE_HSI;
-// HAL_RCCEx_PeriphCLKConfig(&PeriphClkInit);
-//
-// PeriphClkInit.PeriphClockSelection = RCC_PERIPHCLK_USART1;
-// PeriphClkInit.Usart2ClockSelection = RCC_USART1CLKSOURCE_HSI;
-// HAL_RCCEx_PeriphCLKConfig(&PeriphClkInit);
HAL_SYSTICK_Config(HAL_RCC_GetHCLKFreq()/1000);
HAL_SYSTICK_CLKSourceConfig(SYSTICK_CLKSOURCE_HCLK);
@@ -188,7 +162,6 @@
// LED on Nucleo board
BSP_LED_Init(LED_GREEN);
- // Todo: Add UART initialization here
McuInitialized = true;
}
}