aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorSelene ToyKeeper2022-04-14 20:34:21 -0600
committerSelene ToyKeeper2022-04-14 20:34:21 -0600
commit4f6ae9925fefed4694bc87584040edc5426cdd94 (patch)
tree151cf2f7eee3a9f45063a513bfc2cdf42d00061f /hw
parentmerged gchart's latest changes: (diff)
downloadanduril-4f6ae9925fefed4694bc87584040edc5426cdd94.tar.gz
anduril-4f6ae9925fefed4694bc87584040edc5426cdd94.tar.bz2
anduril-4f6ae9925fefed4694bc87584040edc5426cdd94.zip
moved fuses from cfg to hwdef, renamed LED_EN/DISABLE_DELAY to LED_ON/OFF_DELAY
(also really should rename LED_* to CH1_* and LED2_* to CH2_*)
Diffstat (limited to '')
-rw-r--r--hwdef-Sofirn_SP10-Pro.h18
-rw-r--r--hwdef-thefreeman-lin16dac.h2
2 files changed, 18 insertions, 2 deletions
diff --git a/hwdef-Sofirn_SP10-Pro.h b/hwdef-Sofirn_SP10-Pro.h
index 7d0d7f5..e47131a 100644
--- a/hwdef-Sofirn_SP10-Pro.h
+++ b/hwdef-Sofirn_SP10-Pro.h
@@ -53,7 +53,7 @@ PA1 : Boost Enable
#define LED_ENABLE_PIN PIN1_bp
#define LED_ENABLE_PORT PORTA_OUT
-#define LED_DISABLE_DELAY 4
+#define LED_OFF_DELAY 4
#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
@@ -122,4 +122,20 @@ inline void hwdef_setup() {
}
+// set fuses, these carry over to the ELF file but not the HEX file
+// we need this for enabling BOD in Active Mode from the factory.
+// settings can be verified / dumped from the ELF file using this
+// command: avr-objdump -d -S -j .fuse anduril.elf
+FUSES = {
+ .WDTCFG = FUSE_WDTCFG_DEFAULT, /* Watchdog Configuration */
+ .BODCFG = FUSE_ACTIVE0_bm, /* BOD Configuration */
+ .OSCCFG = FUSE_OSCCFG_DEFAULT, /* Oscillator Configuration */
+ .TCD0CFG = FUSE_TCD0CFG_DEFAULT, /* TCD0 Configuration */
+ .SYSCFG0 = FUSE_SYSCFG0_DEFAULT, /* System Configuration 0 */
+ .SYSCFG1 = FUSE_SYSCFG1_DEFAULT, /* System Configuration 1 */
+ .APPEND = FUSE_APPEND_DEFAULT, /* Application Code Section End */
+ .BOOTEND = FUSE_BOOTEND_DEFAULT, /* Boot Section End */
+};
+
+
#endif
diff --git a/hwdef-thefreeman-lin16dac.h b/hwdef-thefreeman-lin16dac.h
index adb7886..9d6b145 100644
--- a/hwdef-thefreeman-lin16dac.h
+++ b/hwdef-thefreeman-lin16dac.h
@@ -47,7 +47,7 @@ Read voltage from VCC pin, has PFET so no drop
// For turning on and off the op-amp
#define LED2_ENABLE_PIN PIN7_bp
#define LED2_ENABLE_PORT PORTA_OUT
-#define LED2_ENABLE_DELAY 80 // how many ms to delay turning on the lights after enabling the channel
+#define LED2_ON_DELAY 80 // how many ms to delay turning on the lights after enabling the channel
// average drop across diode on this hardware
#ifndef VOLTAGE_FUDGE_FACTOR
If you find this content useful please consider a small donation via bitcoin: bitcoin:1mxKyQsHHugqRxPKgwaA7wUwJEGCNthn2?amount=0.001&message=Donation Scraping git contents via cgit is very resource intensive. The continued hosting of these git repositories is entirely financed by your bitcoin contributions. For donations of a least 1 mBTC you include your IP address in the message of your bitcoin donation. This will remove this message in the future for requests from your IP, which will significantly reduce token usage. In any case, any contributions to bitcoin address 1mxKyQsHHugqRxPKgwaA7wUwJEGCNthn2 are very welcome. Thanks in advance for you contribution to a self-sustaining ecosystem.