From 97063be85d0f964ba65a2f1ca355d818a5d93ab5 Mon Sep 17 00:00:00 2001 From: Gabriel Hart Date: Tue, 12 Apr 2022 00:05:27 -0500 Subject: Added FUSES section to SP10 Pro for building ELF file with BOD Active fuse setting --- hwdef-Sofirn_SP10-Pro.h | 2 +- spaghetti-monster/anduril/cfg-sofirn-sp10-pro.h | 15 +++++++++++++++ spaghetti-monster/anduril/version.h | 5 +---- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/hwdef-Sofirn_SP10-Pro.h b/hwdef-Sofirn_SP10-Pro.h index bb10f2f..aea46e1 100644 --- a/hwdef-Sofirn_SP10-Pro.h +++ b/hwdef-Sofirn_SP10-Pro.h @@ -55,7 +55,7 @@ PA1 : Boost Enable #define LED_ENABLE_PORT PORTA_OUT #define USE_VOLTAGE_DIVIDER // use a dedicated pin, not VCC, because VCC input is flattened -#define DUAL_VOLTAGE_FLOOR 20 // for AA/14500 boost drivers, don't indicate low voltage if below this level +#define DUAL_VOLTAGE_FLOOR 21 // for AA/14500 boost drivers, don't indicate low voltage if below this level #define DUAL_VOLTAGE_LOW_LOW 7 // the lower voltage range's danger zone 0.7 volts (NiMH) #define ADMUX_VOLTAGE_DIVIDER ADC_MUXPOS_AIN9_gc // which ADC channel to read diff --git a/spaghetti-monster/anduril/cfg-sofirn-sp10-pro.h b/spaghetti-monster/anduril/cfg-sofirn-sp10-pro.h index bcfc80e..a3463ae 100644 --- a/spaghetti-monster/anduril/cfg-sofirn-sp10-pro.h +++ b/spaghetti-monster/anduril/cfg-sofirn-sp10-pro.h @@ -71,3 +71,18 @@ // enable factory reset on 13H without loosening tailcap #define USE_SOFT_FACTORY_RESET + +// 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 */ +}; \ No newline at end of file diff --git a/spaghetti-monster/anduril/version.h b/spaghetti-monster/anduril/version.h index 1bc3984..9f811f4 100644 --- a/spaghetti-monster/anduril/version.h +++ b/spaghetti-monster/anduril/version.h @@ -1,4 +1 @@ -// this file is replaced automatically by the build script -// set your own date here if you're not using the build script -// otherwise, default to first human contact with the moon -#define VERSION_NUMBER "19690720" \ No newline at end of file +#define VERSION_NUMBER "20220411" -- cgit v1.2.3