Commit graph

2,256 commits

Author SHA1 Message Date
stephan
e49cfbd06a udpterm: .ucmd(), .resp(raise_e)
git-svn-id: svn+ssh://asterix.ieap.uni-kiel.de/home/subversion/stephan/solo/eda/arm@9054 bc5caf13-1734-44f8-af43-603852e9ee25
2024-07-14 08:51:59 +00:00
stephan
4ff318621f remove pront.gpt
git-svn-id: svn+ssh://asterix.ieap.uni-kiel.de/home/subversion/stephan/solo/eda/arm@9053 bc5caf13-1734-44f8-af43-603852e9ee25
2024-07-12 04:33:26 +00:00
stephan
e482dce7af avr/chaos: die(), fix read_adc()
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@9052 bc5caf13-1734-44f8-af43-603852e9ee25
2024-07-10 12:16:12 +00:00
stephan
4f938c7101 avr/chaos: WDT reboot handling
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@9051 bc5caf13-1734-44f8-af43-603852e9ee25
2024-07-10 07:32:55 +00:00
stephan
bac018a420 avr/spi_slave: spi_slave_Rx_wdt()
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@9050 bc5caf13-1734-44f8-af43-603852e9ee25
2024-07-10 07:18:27 +00:00
stephan
cf4812971a flash_CHAOS: add hash of outer pressure sensor
git-svn-id: svn+ssh://asterix.ieap.uni-kiel.de/home/subversion/stephan/solo/eda/arm@9049 bc5caf13-1734-44f8-af43-603852e9ee25
2024-07-10 07:15:07 +00:00
stephan
23b4312500 flash_CHAOS: syntax error in CRONFLY
git-svn-id: svn+ssh://asterix.ieap.uni-kiel.de/home/subversion/stephan/solo/eda/arm@9048 bc5caf13-1734-44f8-af43-603852e9ee25
2024-07-10 07:14:39 +00:00
stephan
8abe20d0f0 flash_CHAOS: prevent THRES.RC from garbling the L1 bits
git-svn-id: svn+ssh://asterix.ieap.uni-kiel.de/home/subversion/stephan/solo/eda/arm@9047 bc5caf13-1734-44f8-af43-603852e9ee25
2024-07-10 07:14:00 +00:00
stephan
929dd90f25 arm/chaos.py: hvc(retry), wdt_load
git-svn-id: svn+ssh://asterix.ieap.uni-kiel.de/home/subversion/stephan/solo/eda/arm@9046 bc5caf13-1734-44f8-af43-603852e9ee25
2024-07-10 07:13:04 +00:00
stephan
ec012d4522 armlib .Script(): script parameters
git-svn-id: svn+ssh://asterix.ieap.uni-kiel.de/home/subversion/stephan/solo/eda/arm@9045 bc5caf13-1734-44f8-af43-603852e9ee25
2024-07-10 07:12:10 +00:00
stephan
977e8acf91 flash_CHAOS: do all HK at 8 seconds cadence
git-svn-id: svn+ssh://asterix.ieap.uni-kiel.de/home/subversion/stephan/solo/eda/arm@9044 bc5caf13-1734-44f8-af43-603852e9ee25
2024-07-09 15:26:11 +00:00
stephan
19b94ad318 flash_CHAOS: load L 1- verbosely, then sleep
git-svn-id: svn+ssh://asterix.ieap.uni-kiel.de/home/subversion/stephan/solo/eda/arm@9043 bc5caf13-1734-44f8-af43-603852e9ee25
2024-07-09 15:16:39 +00:00
stephan
cfdaff315b avr/chaos: dac ramp
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@9042 bc5caf13-1734-44f8-af43-603852e9ee25
2024-07-09 15:07:00 +00:00
stephan
ba3f7874e9 chaos: channel B does not go over D37
git-svn-id: svn+ssh://asterix.ieap.uni-kiel.de/home/subversion/stephan/solo/eda/arm@9041 bc5caf13-1734-44f8-af43-603852e9ee25
2024-07-09 14:22:38 +00:00
stephan
e7575815b3 avr/chaos: change R bit allocation R 1 gives integral ADC
git-svn-id: svn+ssh://asterix.ieap.uni-kiel.de/home/subversion/stephan/solo/eda/arm@9040 bc5caf13-1734-44f8-af43-603852e9ee25
2024-07-09 14:21:02 +00:00
stephan
649d3dde62 irenafile: HC thtree digits precision
git-svn-id: svn+ssh://asterix.ieap.uni-kiel.de/home/subversion/stephan/solo/eda/arm@9039 bc5caf13-1734-44f8-af43-603852e9ee25
2024-07-09 14:11:13 +00:00
stephan
5e9b9089a9 chaos irena: fix L₂[2]=A·CL
git-svn-id: svn+ssh://asterix.ieap.uni-kiel.de/home/subversion/stephan/solo/eda/arm@9038 bc5caf13-1734-44f8-af43-603852e9ee25
2024-07-09 14:09:45 +00:00
stephan
b86733bdca chaos.py: conf, dac
.dac() defaults to 'H' `ramp=True`
CONF? dictionary



git-svn-id: svn+ssh://asterix.ieap.uni-kiel.de/home/subversion/stephan/solo/eda/arm@9037 bc5caf13-1734-44f8-af43-603852e9ee25
2024-07-09 14:05:51 +00:00
stephan
c14de39ded avr/chaos: rounding of adc_noise
git-svn-id: svn+ssh://asterix.ieap.uni-kiel.de/home/subversion/stephan/solo/eda/arm@9036 bc5caf13-1734-44f8-af43-603852e9ee25
2024-07-09 14:04:25 +00:00
stephan
a51bd57266 avr/chaos: use PCINT for spi_busy()
git-svn-id: svn+ssh://asterix.ieap.uni-kiel.de/home/subversion/stephan/solo/eda/arm@9035 bc5caf13-1734-44f8-af43-603852e9ee25
2024-07-08 13:09:09 +00:00
stephan
e9a536bd37 avr/chaos: send spiu_busy only when something was interrupted
git-svn-id: svn+ssh://asterix.ieap.uni-kiel.de/home/subversion/stephan/solo/eda/arm@9034 bc5caf13-1734-44f8-af43-603852e9ee25
2024-07-08 12:07:37 +00:00
stephan
b1f8eab1ff flash_CHAOS: bitfiles
git-svn-id: svn+ssh://asterix.ieap.uni-kiel.de/home/subversion/stephan/solo/eda/arm@9033 bc5caf13-1734-44f8-af43-603852e9ee25
2024-07-07 20:45:10 +00:00
stephan
e7f9aeddb3 libirena: avoid inf or nan in HC σs
git-svn-id: svn+ssh://asterix.ieap.uni-kiel.de/home/subversion/stephan/solo/eda/arm@9032 bc5caf13-1734-44f8-af43-603852e9ee25
2024-07-07 20:44:57 +00:00
stephan
7e45137a6f avr/chaos/read_adc: properly saturate the residuals
git-svn-id: svn+ssh://asterix.ieap.uni-kiel.de/home/subversion/stephan/solo/eda/arm@9031 bc5caf13-1734-44f8-af43-603852e9ee25
2024-07-07 20:43:46 +00:00
stephan
565e1e060c flash_CHAOS: bitfiles
git-svn-id: svn+ssh://asterix.ieap.uni-kiel.de/home/subversion/stephan/solo/eda/arm@9029 bc5caf13-1734-44f8-af43-603852e9ee25
2024-07-07 17:45:32 +00:00
stephan
183064be14 flash_CHAOS: CRON:
- reset fifos 0,1 (S==0)
- C use `nm/count`
- 'W' when S==1, 'W' or 'H' when S==5, LED period 8s
- `chaos/adc` with explicit args


git-svn-id: svn+ssh://asterix.ieap.uni-kiel.de/home/subversion/stephan/solo/eda/arm@9028 bc5caf13-1734-44f8-af43-603852e9ee25
2024-07-07 17:43:57 +00:00
stephan
c1e143165a flash_CHAOS: SAFE H=100, do not reenable SD
git-svn-id: svn+ssh://asterix.ieap.uni-kiel.de/home/subversion/stephan/solo/eda/arm@9027 bc5caf13-1734-44f8-af43-603852e9ee25
2024-07-07 17:34:35 +00:00
stephan
862387250f chaos.python: read_adc, eeprom
read_adc: fix σ. Add σv.
eeprom: function to read, verify write eeprom via ihex files


git-svn-id: svn+ssh://asterix.ieap.uni-kiel.de/home/subversion/stephan/solo/eda/arm@9026 bc5caf13-1734-44f8-af43-603852e9ee25
2024-07-07 17:33:04 +00:00
stephan
0b0f91ed5a avr/chaos: read_adc optimization
git-svn-id: svn+ssh://asterix.ieap.uni-kiel.de/home/subversion/stephan/solo/eda/arm@9025 bc5caf13-1734-44f8-af43-603852e9ee25
2024-07-07 17:30:27 +00:00
stephan
5bc347013f libirena: pressure: do not expect incomplete packets
git-svn-id: svn+ssh://asterix.ieap.uni-kiel.de/home/subversion/stephan/solo/eda/arm@9024 bc5caf13-1734-44f8-af43-603852e9ee25
2024-07-07 17:29:23 +00:00
stephan
ab7daf735d irenafile: 2nd pressure, chaos HK
HK: parse up to 16 type of HK packet
0x4a20: old HK w/o message
0x4a21: HK w/ message
0x4a2c: chaos HV ADC readings

pressure: 2nd sensor, bit 7 in header.



git-svn-id: svn+ssh://asterix.ieap.uni-kiel.de/home/subversion/stephan/solo/eda/arm@9023 bc5caf13-1734-44f8-af43-603852e9ee25
2024-07-07 16:41:58 +00:00
stephan
bcffd2cc2a avr/chaos: fix sense of conf.wdt_toggle
git-svn-id: svn+ssh://asterix.ieap.uni-kiel.de/home/subversion/stephan/solo/eda/arm@9020 bc5caf13-1734-44f8-af43-603852e9ee25
2024-07-06 09:26:31 +00:00
stephan
f97ba19e10 avr/chaos: hv_led improvements, spi_busy, …
- Do not toggle the HV LED at every command.
- Toggle with 'W' and 'H'.
- Remove `conf.wdt_save_addr`.
- Add `conf.wdt_toggle`, toggle period of the HV LED in ISR.
- 'H' etc turns the LED on, `hv_led_on()`.
- At boot, only do `hv_safe()` when `conf.safe` (EEPROM[0]).
- 'r' 1 reads `adc_hv`
- Sanitize arg `read_adc(…, n)`
- `spi_busy()`, break out of long loops when SPI SSEL is asserted.
- `clear_spi_busy()` in the main loop, when SSEL is asserted,
  answer with a busy message.



git-svn-id: svn+ssh://asterix.ieap.uni-kiel.de/home/subversion/stephan/solo/eda/arm@9019 bc5caf13-1734-44f8-af43-603852e9ee25
2024-07-06 09:24:42 +00:00
stephan
28a92f03c6 avr/spi_slave: Tx gets a const *
git-svn-id: svn+ssh://asterix.ieap.uni-kiel.de/home/subversion/stephan/solo/eda/arm@9018 bc5caf13-1734-44f8-af43-603852e9ee25
2024-07-06 09:12:53 +00:00
stephan
08309b3ef3 chaos: ifc-board hv control
git-svn-id: svn+ssh://asterix.ieap.uni-kiel.de/home/subversion/stephan/solo/eda/arm@9017 bc5caf13-1734-44f8-af43-603852e9ee25
2024-07-04 18:00:48 +00:00
stephan
0c5abd3c04 avr/chaos 'w': hv_safe()
git-svn-id: svn+ssh://asterix.ieap.uni-kiel.de/home/subversion/stephan/solo/eda/arm@9016 bc5caf13-1734-44f8-af43-603852e9ee25
2024-07-01 15:03:43 +00:00
stephan
86725822d4 avr/chaos: use WDCE to set WDIE
git-svn-id: svn+ssh://asterix.ieap.uni-kiel.de/home/subversion/stephan/solo/eda/arm@9015 bc5caf13-1734-44f8-af43-603852e9ee25
2024-07-01 14:38:10 +00:00
stephan
e392567688 chaos/wdt: kick wdt in isr, and more wdt mods
git-svn-id: svn+ssh://asterix.ieap.uni-kiel.de/home/subversion/stephan/solo/eda/arm@9014 bc5caf13-1734-44f8-af43-603852e9ee25
2024-07-01 14:01:33 +00:00
stephan
ae980fe830 chaos.hvc(): fix and improve args syntax, swap ADC gains
git-svn-id: svn+ssh://asterix.ieap.uni-kiel.de/home/subversion/stephan/solo/eda/arm@9013 bc5caf13-1734-44f8-af43-603852e9ee25
2024-07-01 09:32:18 +00:00
stephan
0f9751b0a6 avr/chaos: INPDIS, swap ADC channels 1,2
git-svn-id: svn+ssh://asterix.ieap.uni-kiel.de/home/subversion/stephan/solo/eda/arm@9012 bc5caf13-1734-44f8-af43-603852e9ee25
2024-07-01 09:31:21 +00:00
stephan
8188fdb93b avr/chaos/hvosc: init drives PWM pins 0
git-svn-id: svn+ssh://asterix.ieap.uni-kiel.de/home/subversion/stephan/solo/eda/arm@9011 bc5caf13-1734-44f8-af43-603852e9ee25
2024-07-01 09:30:50 +00:00
stephan
8f974dc7a8 flash_CHAOS: fix new syntax choas/cmd 'L'
git-svn-id: svn+ssh://asterix.ieap.uni-kiel.de/home/subversion/stephan/solo/eda/arm@9010 bc5caf13-1734-44f8-af43-603852e9ee25
2024-06-28 15:32:56 +00:00
stephan
06e7e834c0 flash_CHAOS: fix pressure/inj
git-svn-id: svn+ssh://asterix.ieap.uni-kiel.de/home/subversion/stephan/solo/eda/arm@9009 bc5caf13-1734-44f8-af43-603852e9ee25
2024-06-28 15:31:55 +00:00
stephan
c7bb573edf chaos: fix .find_resonance(), fix .hvc()
git-svn-id: svn+ssh://asterix.ieap.uni-kiel.de/home/subversion/stephan/solo/eda/arm@9008 bc5caf13-1734-44f8-af43-603852e9ee25
2024-06-28 15:31:13 +00:00
stephan
b64b024ca1 chaos_hv: do not default to AVR io
git-svn-id: svn+ssh://asterix.ieap.uni-kiel.de/home/subversion/stephan/solo/eda/arm@9007 bc5caf13-1734-44f8-af43-603852e9ee25
2024-06-28 12:27:51 +00:00
stephan
e7e60c45bb IRENA.awk: SampleSync: add SA to output
git-svn-id: svn+ssh://asterix.ieap.uni-kiel.de/home/subversion/stephan/solo/eda/arm@9006 bc5caf13-1734-44f8-af43-603852e9ee25
2024-06-28 12:23:56 +00:00
stephan
21008fbdd1 flash_CHAOS: eth/init/full_duplex
git-svn-id: svn+ssh://asterix.ieap.uni-kiel.de/home/subversion/stephan/solo/eda/arm@9005 bc5caf13-1734-44f8-af43-603852e9ee25
2024-06-21 08:33:25 +00:00
stephan
ca9f0b96de flash_CHAOS: var/cache
git-svn-id: svn+ssh://asterix.ieap.uni-kiel.de/home/subversion/stephan/solo/eda/arm@9004 bc5caf13-1734-44f8-af43-603852e9ee25
2024-06-21 08:33:01 +00:00
stephan
ecaf553451 IRENA CHAOS: add channel name CHK, alias for B
git-svn-id: svn+ssh://asterix.ieap.uni-kiel.de/home/subversion/stephan/solo/eda/arm@9003 bc5caf13-1734-44f8-af43-603852e9ee25
2024-06-21 08:31:29 +00:00
stephan
0276df321f irenarc-chaos: 25mV, KeepAlive sends 'Ping'
git-svn-id: svn+ssh://asterix.ieap.uni-kiel.de/home/subversion/stephan/solo/eda/arm@9002 bc5caf13-1734-44f8-af43-603852e9ee25
2024-06-21 08:30:39 +00:00