- XL is a macro from avr/io.h, avoid as asm param
- SUBI the negative memory location, 3×
- s/jjmp/rjmp/
- store the high byte of avg
- store the index into the correct location s/II/I/, 2×
- optimize for the likely code path
- s/OCF10B/OCF0B/
eeprom isr: (not yet enabled/tested)
- s/$[V]/%[V]/
The DAC uses the Vref selected in ADMUX. We _must_ keep the REFS bits
stable to use the DAC as motor current reference.
Add .conf.dac_ref to initialize REFS, in case the ADC conf is missing.
Change the default ADC config to use the internal 2.5V reference for all
channels.
die(): 'W" 0xd1ff causes infinite uninteruptable sleep.
Fix adc_sum shift.
Properly account for the new adc_sum format.
Do not fault read_adc() when wdt_tick.
git-svn-id: svn+ssh://asterix.ieap.uni-kiel.de/home/subversion/stephan/solo/eda/arm/avr@9052 bc5caf13-1734-44f8-af43-603852e9ee25
Interrupts were never enabled unless 'W'. The WDT was enabled via init_conf().
Result was constant rebooting.
Enable interrupts unconditionally in the main loop.
On boot, detect WDT reset, disable the WDT, chain load a WDT config.
Cmd 'Z' to read the `MCUSR` with the `WDRF`.
Detect WDT interrupts during `spi_slave_Rx()`, answer with an error 'EEW'
`adc_lock` to prevent the WDT ISR to call read_adc() when it is busy.
Also, `read_adc()` will discard the result in case of a `wdt_tick`.
git-svn-id: svn+ssh://asterix.ieap.uni-kiel.de/home/subversion/stephan/solo/eda/arm/avr@9051 bc5caf13-1734-44f8-af43-603852e9ee25
Flag a case where a WDT interrupt messed with command reception.
The user must define the `wdt_tick` flag.
git-svn-id: svn+ssh://asterix.ieap.uni-kiel.de/home/subversion/stephan/solo/eda/arm/avr@9050 bc5caf13-1734-44f8-af43-603852e9ee25
In conf_init, do dac_ramp last, it takes longest.
Do not dac_ramp in 'L' 10.
Configure dac_nominal=700V with hvosc 55,14.
git-svn-id: svn+ssh://asterix.ieap.uni-kiel.de/home/subversion/stephan/solo/eda/arm/avr@9042 bc5caf13-1734-44f8-af43-603852e9ee25