comparison l476rg/Src/main.c @ 4:ca4f5b55b391

working on pwm
author cin
date Wed, 18 Jan 2017 03:27:00 +0300
parents 0c59e7a7782a
children
comparison
equal deleted inserted replaced
3:3d9705e842f8 4:ca4f5b55b391
126 */ 126 */
127 RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK 127 RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK
128 |RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2; 128 |RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2;
129 RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK; 129 RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
130 RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1; 130 RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
131 RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1; 131 RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV2;
132 RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1; 132 RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1;
133 133
134 if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_4) != HAL_OK) 134 if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_4) != HAL_OK)
135 { 135 {
136 Error_Handler(); 136 Error_Handler();