mirror of
https://github.com/espressif/ESP8266_RTOS_SDK.git
synced 2025-08-06 15:15:15 +08:00
bugfix(pwm): fix pwm jitter
This commit is contained in:
@ -45,9 +45,13 @@ static const char *TAG = "pwm";
|
|||||||
|
|
||||||
#define US_TO_MAC_TICK(t) (t)
|
#define US_TO_MAC_TICK(t) (t)
|
||||||
#define US_TO_TICKS(t) US_TO_MAC_TICK(t)
|
#define US_TO_TICKS(t) US_TO_MAC_TICK(t)
|
||||||
|
// Time to switch PWM ahead of time
|
||||||
#define AHEAD_TICKS0 0
|
#define AHEAD_TICKS0 0
|
||||||
#define AHEAD_TICKS1 6
|
// Advance timing of the timer
|
||||||
#define AHEAD_TICKS2 8
|
#define AHEAD_TICKS1 8
|
||||||
|
// The time that remains in the interrupt function (the adjacent target loops in the interrupt)
|
||||||
|
#define AHEAD_TICKS2 10
|
||||||
|
// Minimum timing time
|
||||||
#define AHEAD_TICKS3 2
|
#define AHEAD_TICKS3 2
|
||||||
#define MAX_TICKS 10000000ul
|
#define MAX_TICKS 10000000ul
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user