FIELD NOTE · PWM
PWM 주파수와 듀티는 타이머 입력 클럭, prescaler, 주기 레지스터와 카운트 모드의 조합으로 결정됩니다. MCU마다 레지스터에 저장하는 값과 실제 카운트 수가 다를 수 있어 +1 조건을 반드시 확인해야 합니다.
이 도구의 edge-aligned 계산은 fPWM = fGTM / (Divider × CM0), 듀티는 CM1 / CM0를 사용합니다. up-down 모드에서는 왕복 카운트 시간을 반영해 주파수를 절반으로 계산합니다. 출력 반전을 선택하면 활성 구간은 1 - CM1/CM0입니다.
100 MHz 입력, divider 8, CM0=12500이면 edge-aligned PWM은 1 kHz입니다. CM1=3125는 25% 듀티를 만듭니다. 같은 값으로 up-down 모드를 선택하면 주파수는 500 Hz가 됩니다.
CCR=0, 중간값, CCR=ARR+1의 경계를 확인합니다.센터 정렬은 상향과 하향 카운트를 모두 사용해 일반적으로 edge-aligned보다 주기가 약 두 배가 됩니다. complementary PWM에서는 dead time, break 입력과 출력 극성까지 포함해야 하며 이 기본 계산만으로 전력단 안전성을 판단하면 안 됩니다.
계산 주파수가 측정값의 두 배인 이유는? up-down 모드 또는 GTM clock divider 설정을 먼저 확인하세요.
CM0 값을 그대로 사용해도 되나요? 이 도구는 입력한 CM0를 실제 주기 카운트로 계산합니다. 대상 GTM 채널의 reset-on-compare 동작과 레지스터 인코딩은 매뉴얼에서 확인하세요.
100% 듀티가 정확히 나오지 않는 이유는? 비교 모드, shadow transfer, 출력 극성과 CM1 허용 범위에 따라 경계 동작이 달라질 수 있습니다.
FIELD NOTE · PWM
PWM frequency and duty depend on timer input clock, prescaler, period register, and count mode. Verify whether register values represent N or N−1 for the selected MCU.
This tool uses fPWM = fGTM / (Divider × CM0) for edge-aligned mode and CM1 / CM0 for duty. Up-down mode halves the frequency to account for both count directions. Inversion changes the active ratio to 1 - CM1/CM0.
With a 100 MHz input, divider 8, and CM0=12500, edge-aligned PWM is 1 kHz. CM1=3125 gives 25%. The same values in up-down mode produce 500 Hz.
Center-aligned counting traverses up and down, usually doubling the period. Complementary PWM also requires dead time, break input, and polarity review; this basic calculation alone cannot establish power-stage safety.
Why is measured frequency half the calculation? Check up-down mode and the selected GTM clock divider.
Can CM0 be used directly? This tool treats CM0 as the period count. Confirm reset-on-compare behavior and register encoding for the target GTM channel.
Why is 100% duty imperfect? Compare mode, shadow transfer, polarity, and the valid CM1 range control boundary behavior.