fix: radio transmitted 1kHz tone if screen was dimmed

This commit is contained in:
Nunu 2024-01-22 10:33:30 +01:00
parent 9ec193ece3
commit a7f815bb64

View File

@ -28,7 +28,9 @@ bool backlightOn;
void BACKLIGHT_InitHardware()
{
// 48MHz / 94 / 1024 ~ 500Hz
const uint32_t PWM_FREQUENCY_HZ = 1000;
// kamilsss655: needs to be higher than audible frequency otherwise it will
// be heard on the receiving radio if the screen is dimmed during tx
const uint32_t PWM_FREQUENCY_HZ = 6000;
PWM_PLUS0_CLKSRC |= ((48000000 / 1024 / PWM_FREQUENCY_HZ) << 16);
PWM_PLUS0_PERIOD = 1023;