|
ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
|
Directories | |
| src | |
Drives the real GPT edge-latching hardware, where gpt_capture_input approximates capture in software by polling SW1:
The capture and count inputs need a real edge source that nobody can synthesize in firmware: an external square-wave generator on the GTIOC0A / GTIOC1A pads, a jumper loop-back from a GPT PWM output on a spare channel, or a quadrature encoder for the up/down variant.
The stock EK-RA8D2 additionally has no cleanly-broken-out GTIOCnA pad – the candidate pins collide with the debug UART per HUM Ch 20.6 pin tables, the same limitation that keeps motor_3phase in _unsupported/. The pin assignments in src/main.c (k_gpt_ecc_pin_capture / k_gpt_ecc_pin_count) are illustrative placeholders carrying a TODO(board-rev); update them for a carrier board or jumper wiring before a bench run.
Once an edge source is wired, a memprobe can assert the published globals against a known stimulus frequency: g_gpt_ecc_last_period (last capture delta in ticks), g_gpt_ecc_capture_events, g_gpt_ecc_pulse_count, and g_gpt_ecc_tick (pin-independent free-run liveness).