From a3b9184af454f85da688e8975e248c69418bca02 Mon Sep 17 00:00:00 2001 From: Selene ToyKeeper Date: Fri, 2 Apr 2021 14:07:02 -0600 Subject: need to do some measurements sometime to determine if fast or phase-correct PWM is better on t1616 --- hwdef-gchart-fet1-t1616.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hwdef-gchart-fet1-t1616.h b/hwdef-gchart-fet1-t1616.h index 3d41951..365ecd7 100644 --- a/hwdef-gchart-fet1-t1616.h +++ b/hwdef-gchart-fet1-t1616.h @@ -91,6 +91,9 @@ inline void hwdef_setup() { // set up the PWM // TODO: add references to MCU documentation + // TODO: measure 5 MHz fast PWM vs 10 MHz phase-correct, to see if it + // still has issues at 0/255 and 255/255 like older models did + // (and maybe switch to phase-correct@10MHz) TCA0.SINGLE.CTRLB = TCA_SINGLE_CMP0EN_bm | TCA_SINGLE_CMP1EN_bm | TCA_SINGLE_WGMODE_SINGLESLOPE_gc; TCA0.SINGLE.PER = 255; TCA0.SINGLE.CTRLA = TCA_SINGLE_CLKSEL_DIV1_gc | TCA_SINGLE_ENABLE_bm; -- cgit v1.2.3