Set FAN03 to maximum duty and declutter log output

This commit is contained in:
2024-09-15 21:33:12 +02:00
parent 1cc319cd38
commit ce1444b0f4
2 changed files with 19 additions and 10 deletions

View File

@@ -96,11 +96,12 @@ int PWM_Init(void)
// TIMER2: Fast mode, non-inverting, top=0xFF, prescale /8
// TOP set to 8000000 (f_cpu) / 8 (prescale) / 25000 (f_pwm) - 1
// TCCR2 = BIT(WGM20) | BIT(WGM21) | BIT(COM21) | BIT(CS21);
// OCR2 = 40 - 1; // XXX: OCR2A=TOP OCR2B=duty
TCCR2 = BIT(WGM20) | BIT(WGM21) | BIT(COM21) | BIT(CS21);
OCR2 = 255; // XXX: OCR2A=TOP OCR2B=duty
TCCR2 = 0; // Normal operation
OCR2 = FAN03_MIN_DUTY; // PD7
// TCCR2 = 0; // Normal operation
// OCR2 = FAN03_MIN_DUTY; // PD7
// PORTD &= ~BIT(PD7); // Low
return 0;
}