aboutsummaryrefslogtreecommitdiff
path: root/hwdef-Sofirn_SP10-Pro.h
diff options
context:
space:
mode:
authorSelene ToyKeeper2022-04-14 21:27:08 -0600
committerSelene ToyKeeper2022-04-14 21:27:08 -0600
commitad92203240b60d1f9a916f5f0625e701d6d4387a (patch)
tree8e254f4aa75233c8b8cd8daf80abcc2520d892f5 /hwdef-Sofirn_SP10-Pro.h
parentavrdude fails when .fuse section is included, so omit that when copying elf t... (diff)
downloadanduril-ad92203240b60d1f9a916f5f0625e701d6d4387a.tar.gz
anduril-ad92203240b60d1f9a916f5f0625e701d6d4387a.tar.bz2
anduril-ad92203240b60d1f9a916f5f0625e701d6d4387a.zip
sp10-pro: hard reset phase while turning off, fixes shutoff bug without a delay
(also, made phase hacks individually selectable)
Diffstat (limited to 'hwdef-Sofirn_SP10-Pro.h')
-rw-r--r--hwdef-Sofirn_SP10-Pro.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/hwdef-Sofirn_SP10-Pro.h b/hwdef-Sofirn_SP10-Pro.h
index eee2f72..d7c2081 100644
--- a/hwdef-Sofirn_SP10-Pro.h
+++ b/hwdef-Sofirn_SP10-Pro.h
@@ -49,11 +49,14 @@ PA1 : Boost Enable
// PWM parameters of both channels are tied together because they share a counter
#define PWM1_TOP TCA0.SINGLE.PERBUF // holds the TOP value for for variable-resolution PWM
// not necessary when double-buffered "BUF" registers are used
-//#define PWM1_CNT TCA0.SINGLE.CNT // for resetting phase after each TOP adjustment
+#define PWM1_CNT TCA0.SINGLE.CNT // for resetting phase after each TOP adjustment
+#define PWM1_PHASE_RESET_OFF // force reset while shutting off
+#define PWM1_PHASE_RESET_ON // force reset while turning on
+//#define PWM1_PHASE_SYNC // manual sync while changing level
#define LED_ENABLE_PIN PIN1_bp
#define LED_ENABLE_PORT PORTA_OUT
-#define LED_OFF_DELAY 4
+//#define LED_OFF_DELAY 4 // only needed when PWM1_PHASE_RESET_OFF not used
#define USE_VOLTAGE_DIVIDER // use a dedicated pin, not VCC, because VCC input is flattened
#define DUAL_VOLTAGE_FLOOR 21 // for AA/14500 boost drivers, don't indicate low voltage if below this level