STM32F1, STMCubeMX, PWM, 9g micro servo
0. 참고 사이트
1. 모듈
2. HW 구성
5V로 구동함
3. RCC > HSE > Crystal/Ceramic Resonator
4. Timer Enable
- Clock Source : Internal Clock
- Channel1 : PWM Generation CH1
5. Clock Configuration > 72MHz
6. Configuration > TIM
7. Parameter Settings
- Prescaler : 72-1
- Counter Period : 20000
/*
20ms ( 50Hz )
1) 72MHz System Clock, Prescaler 1MHz Timer Clock
Prescaler = 72MHz / 72MHz - 1 = 1MHz
2) 1MHz Timer Clock, 50Hz
Period = 1MHz / 50Hz = 20,000
*/
20ms ( 50Hz )
1) 72MHz System Clock, Prescaler 1MHz Timer Clock
Prescaler = 72MHz / 72MHz - 1 = 1MHz
2) 1MHz Timer Clock, 50Hz
Period = 1MHz / 50Hz = 20,000
*/
8. SW 구성
while (1) |
9. 소스
50% duty 상태
'STM32F1' 카테고리의 다른 글
STM32F1, STMCubeMX, 2-wire serial interface, DHT22 Temperature, Humidity Sensor (0) | 2018.08.06 |
---|---|
STM32F1, STMCubeMx, Timer Interrupt (0) | 2018.08.06 |
STM32F1, STMCubeMX, PWM, Digital piranha LED (0) | 2018.08.06 |
STM32F1, STMCubeMX, GPIO, PWM, Digital Buzzer (0) | 2018.08.06 |
STM32F1, STMCubeMX, I2C, PCF8563 (0) | 2018.08.03 |