70typedef enum : uint32_t {
105typedef enum : uint8_t {
135typedef enum : uint8_t {
172typedef enum : uint8_t {
221typedef enum : uint8_t {
250typedef enum : uint8_t {
511uint8_t
c6_probe_best(
const uint32_t* votes, uint8_t ignore, uint32_t min_votes);
c6_sideband_idx_t
Index into the Pmod1 side-band pin table.
@ k_c6_sb_irq
Pmod1.7 IRQ, P006.
@ k_c6_sb_reset
Pmod1.8 RESET, P402.
@ k_c6_sb_gpio_a
Pmod1.9 GPIO, P412.
@ k_c6_sb_gpio_b
Pmod1.10 GPIO, P413.
@ k_c6_sb_count
Side-band pin count.
c6_wire_kind_t c6_probe_wire_kind(uint8_t after_high, uint8_t after_low)
Classify one Pmod1 net from its two drive-and-release samples.
void c6_probe_vote(const c6_sideband_sample_t *pre, const c6_sideband_sample_t *mid, const c6_sideband_sample_t *post, c6_probe_stats_t *st)
Fold one transaction's three samples into the classification votes.
ra8_err_t c6_probe_spi_pins_init(void)
Route the Pmod1 SPI pins to SCI2 and own the chip-select as GPIO.
const char * c6_probe_sideband_name(uint8_t idx)
Name a side-band pin for the console.
c6_probe_fmt_t
Radix and field-width constants used by the console formatters.
@ k_c6_fmt_dec_radix
Base ten.
@ k_c6_fmt_dec_digits
"4294967295" is ten digits.
@ k_c6_fmt_hex_byte
Nibbles printed for one byte.
@ k_c6_fmt_hex_max
A uint32_t is eight nibbles.
@ k_c6_fmt_hex_bits
Bits per nibble.
@ k_c6_fmt_hex_word
Nibbles printed for a 16-bit word.
@ k_c6_fmt_hex_alpha
First nibble printed as a letter.
@ k_c6_fmt_hex_mask
Nibble mask.
c6_probe_tunable_t
Timing and clock budgets for the probe.
@ k_c6_probe_gap_ms
Gap between transactions.
@ k_c6_probe_uart_baud
Console baud (J-Link OB VCOM).
@ k_c6_probe_boot_wait_ms
Let the C6 finish booting.
@ k_c6_probe_settle_ms
Post-transfer side-band settle.
@ k_c6_probe_idle_ms
Background heartbeat period.
@ k_c6_probe_sck_hz
Conservative first-light SCK rate.
@ k_c6_probe_cs_hold_ms
Chip-select setup / hold.
void c6_probe_puts(const char *text)
Emit a bounded, NUL-terminated ASCII literal on the console.
bool c6_probe_sweep_mode(ra8_spi_mode_t mode, uint32_t pclka_hz, c6_probe_stats_t *st, uint8_t *hs_idx)
Run the transaction burst for one SPI mode.
c6_wire_kind_t
What the drive-and-release test says is on the far end of a net.
@ k_c6_wire_low_side
Snapped to 0: pull-down or driven low.
@ k_c6_wire_high_side
Snapped to 1: pull-up or driven high.
@ k_c6_wire_odd
Inverted result: not physically sane.
@ k_c6_wire_floating
Held both levels: no termination.
void c6_probe_put_u32(uint32_t value)
Emit an unsigned integer in decimal.
void c6_probe_sample_sideband(c6_sideband_sample_t *out)
Read every Pmod1 side-band pin into one sample.
void c6_probe_print_sideband(const char *label, const c6_sideband_sample_t *s)
Print a labelled side-band sample as label P006=1 P402=0 ....
ra8_err_t c6_probe_pull_contest(c6_probe_stats_t *st)
Find which side-band pins an external driver is holding low.
uint8_t c6_probe_sunk_pin(const c6_probe_stats_t *st, uint8_t ignore)
Name the one pin that lost every read of the pull-up contest.
c6_probe_budget_t
Statically provable loop bounds (NASA Power of 10 Rule 2).
@ k_c6_probe_hs_poll_ms
Delay between handshake polls.
@ k_c6_probe_min_votes
Votes required to claim a mapping.
@ k_c6_probe_dump_bytes
Payload bytes hex-dumped per frame.
@ k_c6_probe_xfer_per_mode
Transactions attempted per SPI mode.
@ k_c6_probe_mode_count
SPI modes swept.
@ k_c6_probe_str_max
Longest console literal accepted.
@ k_c6_probe_pull_samples
Reads per pin in the pull-up contest.
@ k_c6_probe_hs_poll_max
Handshake polls before giving up.
@ k_c6_probe_pull_settle_ms
Settle between pull-up contest reads.
c6_wire_idx_t
Index into the Pmod1 muxed-net table.
@ k_c6_wire_p804
SS2 – J26-1 in SPI, J26-4 in UART.
@ k_c6_wire_p801
COPI2 – J26-2 in SPI and UART positions.
@ k_c6_wire_p802
CIPO2 – J26-3 in SPI and UART positions.
@ k_c6_wire_p800
CTS2 – J26-1 only in the UART position.
@ k_c6_wire_p803
SCK2 – J26-4 only in the SPI position.
@ k_c6_wire_count
Muxed-net candidate count.
ra8_err_t c6_probe_sideband_init(void)
Claim the four Pmod1 side-band pins as no-pull digital inputs.
uint8_t c6_probe_best(const uint32_t *votes, uint8_t ignore, uint32_t min_votes)
Pick the side-band pin that won the vote outright, or report none.
void c6_probe_wire_test(void)
Run the drive-and-release test over every Pmod1 muxed net.
void c6_probe_put_hex(uint32_t value, uint8_t digits)
Emit a value as fixed-width lowercase hexadecimal.
uint8_t c6_probe_cs_hunt(c6_probe_stats_t *st)
Find which MCU pin the board's Pmod1 mux has wired to the C6's chip-select, and identify HANDSHAKE at...
void c6_probe_resolve_map(const c6_probe_stats_t *st, uint8_t *hs_idx, uint8_t *dr_idx)
Resolve the HANDSHAKE and DATA_READY side-band map from the accumulated evidence.
The esp-hosted SPI full-duplex wire format, hand-decoded.
Error Code Definitions for ra8-firmware.
ra8_err_codes_t ra8_err_t
Canonical error-return type used by every ra8-firmware API.
SPI_B controller driver (RA8D2 Type-B SPI peripheral).
ra8_spi_mode_t
CPOL / CPHA combinations.
Running evidence gathered across every transaction.
uint8_t pull_low[k_c6_sb_count]
Reads that lost to an external sink.
uint8_t ever_high[k_c6_sb_count]
Pin was seen high at least once.
uint32_t hs_vote[k_c6_sb_count]
Pin dropped while CS was asserted.
uint32_t attempts
Transactions clocked.
uint32_t idle_frames
Idle filler frames decoded.
uint32_t dr_vote[k_c6_sb_count]
Pin dropped once the queue drained.
uint32_t data_frames
Real frames with a good checksum.
uint8_t pull_samples
Pull-up reads per pin; 0 = not run.
uint8_t ever_low[k_c6_sb_count]
Pin was seen low at least once.
uint32_t bad_csum_frames
Sane shape, checksum mismatched.
One simultaneous reading of every side-band pin.
uint8_t level[k_c6_sb_count]
Per-pin logic level (0 or 1).