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.
Dependencies: HC_SR04_Ultrasonic_Library Servo mbed
Fork of FIP_REV1 by
BlueNRG_F4_BSP/src/stm32f4xx_cube_hal.c@0:3d641e170a74, 2015-05-19 (annotated)
- Committer:
- julientiron
- Date:
- Tue May 19 16:43:59 2015 +0000
- Revision:
- 0:3d641e170a74
BLE;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
julientiron | 0:3d641e170a74 | 1 | /* Includes ------------------------------------------------------------------*/ |
julientiron | 0:3d641e170a74 | 2 | #include "cube_hal.h" |
julientiron | 0:3d641e170a74 | 3 | |
julientiron | 0:3d641e170a74 | 4 | /** |
julientiron | 0:3d641e170a74 | 5 | * System Clock Configuration |
julientiron | 0:3d641e170a74 | 6 | */ |
julientiron | 0:3d641e170a74 | 7 | void SystemClock_Config(void) |
julientiron | 0:3d641e170a74 | 8 | { |
julientiron | 0:3d641e170a74 | 9 | RCC_ClkInitTypeDef RCC_ClkInitStruct; |
julientiron | 0:3d641e170a74 | 10 | RCC_OscInitTypeDef RCC_OscInitStruct; |
julientiron | 0:3d641e170a74 | 11 | |
julientiron | 0:3d641e170a74 | 12 | RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI; |
julientiron | 0:3d641e170a74 | 13 | RCC_OscInitStruct.HSIState = RCC_HSI_ON; |
julientiron | 0:3d641e170a74 | 14 | RCC_OscInitStruct.HSICalibrationValue = 6; |
julientiron | 0:3d641e170a74 | 15 | RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON; |
julientiron | 0:3d641e170a74 | 16 | RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI; |
julientiron | 0:3d641e170a74 | 17 | RCC_OscInitStruct.PLL.PLLM = 16; |
julientiron | 0:3d641e170a74 | 18 | RCC_OscInitStruct.PLL.PLLN = 256; |
julientiron | 0:3d641e170a74 | 19 | RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV8; |
julientiron | 0:3d641e170a74 | 20 | RCC_OscInitStruct.PLL.PLLQ = 4; |
julientiron | 0:3d641e170a74 | 21 | HAL_RCC_OscConfig(&RCC_OscInitStruct); |
julientiron | 0:3d641e170a74 | 22 | |
julientiron | 0:3d641e170a74 | 23 | RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_SYSCLK; |
julientiron | 0:3d641e170a74 | 24 | RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK; |
julientiron | 0:3d641e170a74 | 25 | HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_1); |
julientiron | 0:3d641e170a74 | 26 | } |