From 0f11e5ddd663cce89eb2b12e7146d72ef861a58f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xose=20P=C3=A9rez?= Date: Tue, 5 Dec 2017 10:29:28 +0100 Subject: [PATCH] Using NMI timer for dimmers and reducing freq to 500Hz --- code/espurna/config/general.h | 2 +- code/espurna/libs/pwm.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/code/espurna/config/general.h b/code/espurna/config/general.h index 71bbe350..48644f5b 100644 --- a/code/espurna/config/general.h +++ b/code/espurna/config/general.h @@ -521,7 +521,7 @@ PROGMEM const char* const custom_reset_string[] = { #endif #if LIGHT_PROVIDER == LIGHT_PROVIDER_DIMMER -#define LIGHT_MAX_PWM 5000 // 5000 * 200ns => 1 kHz +#define LIGHT_MAX_PWM 10000 // 5000 * 200ns => 1 kHz #endif #endif // LIGHT_MAX_PWM diff --git a/code/espurna/libs/pwm.c b/code/espurna/libs/pwm.c index 5b5f306b..9a316bb8 100644 --- a/code/espurna/libs/pwm.c +++ b/code/espurna/libs/pwm.c @@ -25,7 +25,7 @@ #define PWM_MAX_CHANNELS 8 #endif #define PWM_DEBUG 0 -#define PWM_USE_NMI 0 +#define PWM_USE_NMI 1 /* no user servicable parts beyond this point */