Commit graph

183 commits

Author SHA1 Message Date
Stephan I. Böttcher
a3377dc97e cmd: require a sig for C as well 2024-04-14 22:36:18 +02:00
Stephan I. Böttcher
e6197c43ad cmd: E and U for writing EEPROM and USERROW 2024-04-14 22:14:11 +02:00
Stephan I. Böttcher
9030ed194e uart: tx buffer 128 bytes → 256 bytes, stack size 128 bytes 2024-04-14 21:31:19 +02:00
Stephan I. Böttcher
9aa0daa6ab trigger: fix immediate 2024-04-14 20:32:57 +02:00
Stephan I. Böttcher
e16bac4cbc more to .gitignore 2024-04-14 20:24:22 +02:00
Stephan I. Böttcher
fd575d8f17 cmd T, fix period trigger 2024-04-14 20:23:47 +02:00
Stephan I. Böttcher
f7484a5d7e rtc: add debug counter 2024-04-14 20:21:46 +02:00
Stephan I. Böttcher
ec0609759b cmd: work now, add some assembler 2024-04-14 19:40:04 +02:00
Stephan I. Böttcher
e69a74ce46 rtc: add debug counter 2024-04-14 19:38:27 +02:00
Stephan I. Böttcher
9122a63f77 rtc: add debug counter 2024-04-14 19:35:54 +02:00
Stephan I. Böttcher
7e13f07ada cmd: fix parse_hex_nibble(), better output, W command 2024-04-14 04:36:26 +02:00
Stephan I. Böttcher
e8109f6f5c uart: fix in rx_dismiss: 2024-04-14 04:35:10 +02:00
Stephan I. Böttcher
d72beb7218 uart: mostly assembler, now
Most uart code is now in `uart_tx.S`.
Code close to the hardware stays in `uart.c` to use `io.h`.
The .S does not use the CPP, yet.
2024-04-14 03:36:55 +02:00
Stephan I. Böttcher
a2a77ae553 uart: save a few instructions 2024-04-13 19:02:54 +02:00
Stephan I. Böttcher
3a9c3b1741 uart: add missing RETI 2024-04-13 17:46:44 +02:00
Stephan I. Böttcher
20fa2135e7 cmd: only accept lowercase hex digits
Not to confuse hex parameters with uppercase commands.
2024-04-13 17:45:08 +02:00
Stephan I. Böttcher
ec97a8c498 make: drop bate_CFLAGS 2024-04-13 17:44:04 +02:00
Stephan I. Böttcher
82b42966ba cmd: C and M 2024-04-13 01:49:17 +02:00
Stephan I. Böttcher
fd9957aee1 adc: fix and call send_calib_adc() 2024-04-12 18:58:12 +02:00
Stephan I. Böttcher
8d38419263 adc: fix saddus() 2024-04-12 18:34:23 +02:00
Stephan I. Böttcher
ad4effa467 uart: rework uart_busy
- implement `tx()` in asm, does not work yet!
- enable TXC interrupt, to be woken when the uart is done
  in order to power down.  Alias the DRE interrupt.
- Rework `send_char()` and `send_str()`.
- Remove …_nosleep() and `panik()`.
- Better account for volatile-ness of buffer pointers.
2024-04-12 16:41:46 +02:00
Stephan I. Böttcher
410915515e bate: print eeprom in words 2024-04-12 16:40:57 +02:00
Stephan I. Böttcher
1eecc696da adc: calibrated output
- add calib values to `adc_conf`,
- double the size of `struct adc_conf`
- reduce the sape for `testdata`.
- implement the calibration with offset and scale.
2024-04-12 02:08:31 +02:00
Stephan I. Böttcher
c452e5bc61 eeprom: forget about specifying the address or vars 2024-04-12 02:07:04 +02:00
Stephan I. Böttcher
f692d97cf0 POWER_LED and POWER_SYDBY 2024-04-11 21:22:53 +02:00
Stephan I. Böttcher
be5c18ca52 uart: fix uart_busy(), we were powering down too early 2024-04-11 21:22:05 +02:00
Stephan I. Böttcher
763ab24e9e bate: output config improvements
- new config.cperiod: print configuration one in a while
- SEND_BATED: print `W` and `D` sensor words separately,
  send `W` with config.
- testdata: do not wait for config.period.
- clock: dorp `trigger` from `T` record,
  send it with debug `X` instead
- config version 4, sane order.
- adc `A`: do not send unused entries.
2024-04-11 17:02:51 +02:00
Stephan I. Böttcher
365d7382c1 adc: stop at first unused adc_conf entry 2024-04-11 11:30:17 +02:00
Stephan I. Böttcher
1eb7e9c40a make isr variables volatile 2024-04-11 04:09:34 +02:00
Stephan I. Böttcher
83fa8725f0 move adc_conf and test_data into the EEPROM 2024-04-11 03:51:19 +02:00
Stephan I. Böttcher
e62e03f550 print E adc_conf on boot 2024-04-10 18:20:41 +02:00
Stephan I. Böttcher
59fe3a7949 greeting improvement 2024-04-10 18:15:24 +02:00
Stephan I. Böttcher
a341b2c454 baye.config: add BC_SPI 2024-04-10 18:13:57 +02:00
Stephan I. Böttcher
affd866a7c spi: replace bit banging with SPI0 2024-04-10 18:10:57 +02:00
Stephan I. Böttcher
2287dbc7b9 calib: fix turbo test case[0] 2024-04-10 18:09:09 +02:00
Stephan I. Böttcher
9af59b100f bate: use 16-bit frames 2024-04-10 01:24:24 +02:00
Stephan I. Böttcher
423016de10 bate_wait: sleep() waiting for pin interrupt 2024-04-09 23:55:10 +02:00
Stephan I. Böttcher
fc180c1881 uart: pin sense bothedges 2024-04-09 23:50:43 +02:00
Stephan I. Böttcher
da3a5dd824 adc: now it works w/ interrupts
The problem was: the TCA0 IRQ was busylooping

`send_char()` now sleeps.
Debug counters are cleared.
Config version 3 with acquisition period.
2024-04-09 23:19:08 +02:00
Stephan I. Böttcher
b222407beb adc: worknow, but w/o isr
The RESRDY vector is never called, neither the SAMPRDY, when enabled.
No idea why. We do polling now.
No idea what wakes the CPU from sleep with STOP_MCLK.
2024-04-09 19:08:23 +02:00
Stephan I. Böttcher
ea52a15e5b uart: panic(), spaces in hexdump 2024-04-09 18:14:39 +02:00
Stephan I. Böttcher
9afa792b56 bate: fixes
- adc.h: adc_init(), disable inputs used for analog inputs.
- bate: PORTA → VPORTA, restore blinkenlight's bate_bit()
- config V2: add cpu_clk, remove config pointer indirection
- CLKCTRL: make extra sure we run at 10 MHz
    → regained telemetry at 2400 baud
- turn on LED while digitizing and transmitting
2024-04-09 00:43:34 +02:00
Stephan I. Böttcher
3269949c0f Makefile: BV_VERS=2 2024-04-09 00:42:25 +02:00
Stephan I. Böttcher
7bad559314 calib: fix bitsize of dT, add test case 2024-04-09 00:41:13 +02:00
Stephan I. Böttcher
d13c920471 adc: fix globals, add adc_init() 2024-04-09 00:40:07 +02:00
Stephan I. Böttcher
e1e0d63df1 mul16sun: fix case n=0 2024-04-09 00:38:13 +02:00
Stephan I. Böttcher
8e4d4f1120 adc: annotate asm savings in isr 2024-04-08 10:05:55 +02:00
Stephan I. Böttcher
5b2811bb48 adc readout 2024-04-08 01:47:46 +02:00
Stephan I. Böttcher
6cc29ed1b7 make %.id %.verify: -qq 2024-04-07 17:45:42 +02:00
Stephan I. Böttcher
20c0bd18e5 text_calib to SEND_HEX 2024-04-07 12:25:20 +02:00