Modified 'Timebase Source' from TIM1 to TIM17, TIM1 now operates with 1 MHz input and 1 ms period, channel 1 is configured as PWM output mode and mapped to PA8 to drive a buzzer.
This commit is contained in:
+4
-4
@@ -68,11 +68,11 @@ void MX_GPIO_Init(void)
|
||||
HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
|
||||
|
||||
/*Configure GPIO pins : PA0 PA1 PA4 PA5
|
||||
PA6 PA7 PA8 PA11
|
||||
PA12 PA15 */
|
||||
PA6 PA7 PA11 PA12
|
||||
PA15 */
|
||||
GPIO_InitStruct.Pin = GPIO_PIN_0|GPIO_PIN_1|GPIO_PIN_4|GPIO_PIN_5
|
||||
|GPIO_PIN_6|GPIO_PIN_7|GPIO_PIN_8|GPIO_PIN_11
|
||||
|GPIO_PIN_12|GPIO_PIN_15;
|
||||
|GPIO_PIN_6|GPIO_PIN_7|GPIO_PIN_11|GPIO_PIN_12
|
||||
|GPIO_PIN_15;
|
||||
GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;
|
||||
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
|
||||
|
||||
Reference in New Issue
Block a user