Commit Graph

4 Commits

Author SHA1 Message Date
Maximilian Deubel f1b6073a27 driver: swdp_bitbang: hardcode request lut
Hardcode the lookup table for SWDP requests.
This is an optimization to save some space.
Documentation was added to understand the values.

Signed-off-by: Maximilian Deubel <maximilian.deubel@nordicsemi.no>
2024-06-14 11:14:17 +02:00
Johann Fischer 3e8f9fb7df drivers: swdp_bitbang: add SW output sequence
Add API to read count bits from SWDIO into data LSB first.

Signed-off-by: Maximilian Deubel <maximilian.deubel@nordicsemi.no>
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-06-14 11:14:17 +02:00
Maximilian Deubel 3ef2c66a8a driver: swdp_bitbang: rework pin configurations
Move low-level GPIO functions to a separate file and use GPIO driver
API if low-level GPIO support is not available for the platform.
Allows alternative pin configuration using only two pins, clk and dio.
Improve binding description.

Signed-off-by: Maximilian Deubel <maximilian.deubel@nordicsemi.no>
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-06-14 11:14:17 +02:00
Johann Fischer 3cf630fb0b driver: add SWDP driver interface API and bit-bang driver
Add Serial Wire Debug Port interface driver API and bit-bang driver.

The driver requires a simple Hardware Interface Circuits (HICs),
where signals CLK, DOUT, DIN, ENn, OE_ENn, RESETn
are connected to board GPIOs and buffered signals SWD_CLK and SWD_DIO
to the target.

Signal OE_ENn controls the direction of the Serial Wire (SWD_DIO),
ENn the buffers SWD_CLK possibly others and enables/disables HIC.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-06-14 11:14:17 +02:00