Stephan I. Böttcher
88dace0e0f
ssp_set_buffer(0,0): no buffer
...
use ssp_set_buffer(0,-1) to use the full scratch buffer.
2024-11-08 16:32:21 +01:00
Stephan I. Böttcher
6ad8702936
ads8688: batch driven
...
- add batch driven operations
- `read_cb`: read manually selected channels up to 256 time
- `read_auto_cb`: read auto channels
- `gains_cb`: read or set channel ranges
- `adc/frame`: send single spi frames
- `adc/gains`: read or set channel ranges
- `adc/read`: start readout
- `adc/print`: act on read results/status
2024-11-08 15:43:06 +01:00
Stephan I. Böttcher
131d90dd9d
ssp: fixes and changes for ads8688
...
- remove `ssp_lastword`, unused
- `ssp_set_buffer(0, size)` limit scratch buffer use to `size`
- `ssp_callback` reset when called.
- `ssp_submit_job` call `ssp_set_buffer()`, set `ssp_callback`
- `s/ssp_submit_batch/ssp_start_batch/`
- new: `ssp_submit_batch()` to atomically set `ssp_callback`
- `ssel_delay()`: `__asm__ volatile`
- `ssp_b_scratch`, `ssp_b_buffer`: `call ssp_set_buffer()`
- `ssp_b_whilebuf`: abort `ssp_b_repeat` when buffer runs out.
- `ssp_b_stop`, `ssp_b_return`: postpone while `ssp_b_repeat`
- `ssp_b_jump`: fix jump offset, apply offset to `->batch` too
- `ssp_b_job`: only submit when nonempty
- `ssp_start_batch()`: do not set `ssp_callback`
2024-11-08 15:25:37 +01:00
stephan
d6be6f5afe
parser: avoid non-const string
...
git-svn-id: svn+ssh://asterix.ieap.uni-kiel.de/home/subversion/stephan/solo/eda/arm@9133 bc5caf13-1734-44f8-af43-603852e9ee25
2024-11-08 15:17:01 +01:00
stephan
dfbbb088d2
isr: add "memory" to CPSR asm
...
git-svn-id: svn+ssh://asterix.ieap.uni-kiel.de/home/subversion/stephan/solo/eda/arm@9134 bc5caf13-1734-44f8-af43-603852e9ee25
2024-11-08 15:16:46 +01:00
Stephan I. Böttcher
0feba685ea
ssp_commands: ssp/reads, ssp/send
...
- ssp/config: make value bits orthogonal
- ssp/reads: setup ssp_match
- ssp/send: ssp_submit a job
2024-11-06 09:01:52 +01:00
Stephan I. Böttcher
886c367914
ssp_match: member order, make .mask the high order bits
2024-11-06 09:01:09 +01:00
Stephan I. Böttcher
fe53cbe6b8
ccp/config/pressure
2024-11-05 10:14:39 +01:00
Stephan I. Böttcher
b79ae77e39
new command ssp/config
...
configure the ssp (mode,ssel)
init, deassert, assert, wait, reset
2024-11-04 23:35:46 +01:00
Stephan I. Böttcher
69ff47f149
pressure_command: ssp_batch readout
...
keep the old implementation as bate_cmd.
2024-11-04 21:12:32 +01:00
Stephan I. Böttcher
0514546b7d
ssp job.count
...
- Replace `.idle_count` by `.count`
- Keep track of received and sent frames.
- Properly extend the job at a match.
2024-11-04 14:35:01 +01:00
Stephan I. Böttcher
c972a723c1
make %.s -fverbose-asm
2024-11-04 14:34:50 +01:00
Stephan I. Böttcher
60d830fdae
ssp variable names
2024-11-03 21:14:33 +01:00
Stephan I. Böttcher
71e567fdc5
ssp_start_buffer, size in short words
2024-11-03 20:21:05 +01:00
Stephan I. Böttcher
a91d06723f
ssp_batch: all new
2024-11-03 17:50:50 +01:00
Stephan I. Böttcher
47be0651b0
pressure: struct ssp_batch bate_batch[]
2024-11-03 12:17:52 +01:00
Stephan I. Böttcher
bcf8f25f7a
Makefile: -Wno-missing-field-initializers
2024-11-03 12:17:13 +01:00
Stephan I. Böttcher
bff7cdb5d4
ssp_abort_batch()
2024-11-03 12:16:28 +01:00
Stephan I. Böttcher
5954e875b1
ssp_batch->wait
2024-11-02 23:03:18 +01:00
Stephan I. Böttcher
57d95b7a1b
timer_wait: callback args, …
2024-11-02 23:02:37 +01:00
Stephan I. Böttcher
6c8119424b
timer_wait
...
Turn on timer1.
Reset and Interrupt at MR0.
Configure ISR for both timers.
Allow waiting for timer events and pin state:
- `mclk`: Timer0, a number of MCLK interrupts (65536kHz)
- `pclk`: Timer1, one-shot MR0 interrupt, 60MHz.
- `ccr0`: AD0.1…3 reconfigured as Capture inputs.
- `ccr1`: MISO, AD1.2 reconfigured as Capture inputs.
- `gpio0`: Wait for pin state.
Use case: MS5534C readout
- CAP1.3 irq on falling edge from MISO
- 50ms timeout via timer0 `mclk`
- 35ms timeout via timer1 `pclk`
- test if MISO is low at each mclk irq.
(could be all configured at the same time.)
2024-11-02 18:35:17 +01:00
Stephan I. Böttcher
44a7192afb
isr.h: assign vector for timer1, at low priority
2024-11-02 18:32:02 +01:00
Stephan I. Böttcher
3e62d01ad8
gpio.h: more timer pins enumerated
2024-11-02 18:30:47 +01:00
Stephan I. Böttcher
4d08354a50
pcb.h: fix P028_Capture0_2
2024-11-02 18:29:52 +01:00
Stephan I. Böttcher
91fa47d67c
ssp: struct ssp_wait
2024-11-02 15:41:33 +01:00
Stephan I. Böttcher
eff851b274
struct ssp_batch
2024-11-02 14:26:19 +01:00
Stephan I. Böttcher
ed7c44de29
printf: add flags, printf_partial
2024-11-02 13:55:56 +01:00
Stephan I. Böttcher
33e969b5a2
uart1: fixes, UART1_RX_FLAG_SEND
...
- major fixes all over
- directly send the received string/data via `printf()`
even without providing a buffer
uart1_receive(s=0, 120, UART1_RX_FLAG_SEND)
2024-11-02 13:28:54 +01:00
Stephan I. Böttcher
d11527f131
gpio.h: enumerate CAP and MAT pin functions
2024-11-02 13:26:32 +01:00
Stephan I. Böttcher
6d5e8152aa
ads8688: implement adc readout
2024-11-01 21:39:45 +01:00
Stephan I. Böttcher
63d3bf4bc8
ltc2656: deassert ssel before assert
2024-11-01 21:37:12 +01:00
Stephan I. Böttcher
d071775cc6
ltc2656: new file, send ssp frames to the dac
2024-11-01 16:45:17 +01:00
Stephan I. Böttcher
2a62ce34c1
make ssp_conf_* variable, drop _daisy
2024-11-01 16:34:59 +01:00
Stephan I. Böttcher
61fc1996a3
pressure/send: printf results
2024-11-01 12:54:08 +01:00
Stephan I. Böttcher
9583a2aafd
pressure: bate_cmd()
...
commmnd to drive `read_pressure()`
2024-11-01 12:37:00 +01:00
Stephan I. Böttcher
3f378da7ea
read_pressure() make it all compile
...
- `ssp_init(0)` make `ssp_config()` arg optional, fixes `main()`
- `ssp_conf_bate[]` is non const array accessible as array variable
"bate_mode"
- `read_pressure()` takes `idx` arg to `ssp_conf_bate[]`.
- remove argument to `ssp_assert_ssel()`
- make `ssp_deassert_ssel()` static inline
- fix compiler warnings and errors
- make ssp_submit(cmd) arg const.
- rearrange #includes
- …
2024-11-01 10:52:39 +01:00
Stephan I. Böttcher
1a93e99d96
message.c: avoid signed/unsigned warning
2024-11-01 10:50:28 +01:00
Stephan I. Böttcher
1997030377
gpio.h: include <lpc2148/gpio.h>
2024-11-01 10:49:09 +01:00
Stephan I. Böttcher
3b667318cb
pressure.c: read_pressure()
...
Implement readout of the MS5534C pressure sensor.
2024-11-01 10:18:32 +01:00
Stephan I. Böttcher
6aaced18ad
gpio.h: define SSP_MISO
...
define macro `SSP_MISO` to read the status of the miso line. Waiting
for the MS5534C pressure sensor conversion need to look at the status of
this pin.
The pin could be configured as an edge sensitive interrupt
via timer1 capture. With a neat gimick to measure the conversion time.
2024-11-01 10:14:27 +01:00
Stephan I. Böttcher
de392895d7
ssp.h: ssp_set_match(), …
...
- helper to set all five match vars in one line.
- fix arg names of `ssp_submit()`
2024-11-01 10:12:49 +01:00
Stephan I. Böttcher
ce64c3ac74
ssp.c: fixes
...
- decrement `ssp_frame_count` also when `rc`
- do not reset buffer in `ssp_reset()`
- return from `ssp_busy()` returned by `ssp_wait()`
2024-11-01 10:10:26 +01:00
Stephan I. Böttcher
560f7b806b
ssp rewrite, gpio
...
Drop ssp compatibility, injection, etc.
Rewrite the isr optimised for small messages.
Allow operation without buffer.
Add gpio documentation and simple gpio primitives.
2024-10-31 19:00:19 +01:00
Stephan I. Böttcher
88f7f36fb4
printf: fix whitespace
2024-10-29 20:03:47 +01:00
Stephan I. Böttcher
b23ad870c8
echo/print: use printf() to poll_dma
2024-10-29 16:35:41 +01:00
Stephan I. Böttcher
f7123ff29d
printf()
...
Implement printf() to send output via poll_dma.
The printed output must fit into a single 512 byte sized buffer. It is
appended to the current buffer whenit fits, else, the buffer is
submitted and the message goes into a new one. With `poll_dma_nonblock`,
every print goes into a new data block, zero filled.
2024-10-29 13:35:38 +01:00
Stephan I. Böttcher
3f192fc07f
poll_dma_submit(0,0)
...
Allow calling `poll_dma_submit()` with both args zero. The effect is to
submit external changes to the buffer, or retry a failed submission of a
full buffer.
To be used by: printf()
2024-10-29 13:32:26 +01:00
Stephan I. Böttcher
21750a6e98
remove Altera ifc
...
keep the files `altera.[ch]` for ssp/spi.
keep `pressure.[ch]` for the calibration.
2024-10-28 16:33:13 +01:00
Stephan I. Böttcher
2660f821fd
add uart1 driver and basic mainloop support
2024-10-22 22:03:49 +02:00
Stephan I. Böttcher
61b028bcdc
HK ADC vars fix
2024-10-21 21:34:18 +02:00