STM32F1, STMCubeMX, PWM, Digital piranha LED
0. 참고 자료
테스트를 진행한 모듈의 스펙 중에 PWM 관련한 자료가 없어서 임의로 동작시켰습니다.
1. 모듈
2. HW 구성
3V3 ~ 5V 로 구동됨
3. Timer Enable
- Clock Source : Internal Clock
- Channel1 : PWM Generation CH1
4. RCC > HSE > Crystal/Ceramic Resonator
5. Clock Configuration > 72MHz
6. Configuration > TIM
7. Parameter Settings
Prescaler : 72-1
Counter Period : 100
/*
0.1ms
1) 72MHz System Clock, Prescaler 1MHz Timer Clock
Prescaler = 72MHz / 72MHz - 1 = 1MHz
2) 1MHz Timer Clock, 100, 10KHz
Period = 1MHz / 10KHz = 100
*/
0.1ms
1) 72MHz System Clock, Prescaler 1MHz Timer Clock
Prescaler = 72MHz / 72MHz - 1 = 1MHz
2) 1MHz Timer Clock, 100, 10KHz
Period = 1MHz / 10KHz = 100
*/
8. SW 구성
HAL_TIM_PWM_Start(&htim3, TIM_CHANNEL_1); |
9. 소스
'STM32F1' 카테고리의 다른 글
STM32F1, STMCubeMx, Timer Interrupt (0) | 2018.08.06 |
---|---|
STM32F1, STMCubeMX, PWM, 9g micro servo (0) | 2018.08.06 |
STM32F1, STMCubeMX, GPIO, PWM, Digital Buzzer (0) | 2018.08.06 |
STM32F1, STMCubeMX, I2C, PCF8563 (0) | 2018.08.03 |
STM32F1, STMCubeMX, ADC, Internal Temperature Sensor (0) | 2018.08.03 |