feat(debug): add esp32s31 debug probe support

- add ESP32-S31 debug probe LL, target IDs, capability macros, and GPIO signal mapping
- allow LP probe channels to configure four signal bytes while keeping 16 GPIO outputs
- add HP and LP probe read tests, including LP 32-bit read verification
- keep existing vbat LP probe usage aligned with the new LP channel behavior
This commit is contained in:
morris
2026-05-25 19:03:37 +08:00
parent c23e87b81b
commit e20db709aa
12 changed files with 397 additions and 57 deletions
@@ -133,20 +133,22 @@ static inline void debug_probe_ll_set_lower16_output(debug_probe_unit_id_t unit_
* @brief Set the upper 16 bits of the probe output
*
* @param part where does the probe_top_out[31:16] come from
* @note No-op for LP unit: only 16 bits are routed to LP GPIO, so upper 16 selection has no effect.
* @note Only probe_top_out[15:0] can be routed to GPIO pads, but both HP and LP units still keep a 32-bit probe_top_out register.
*/
static inline void debug_probe_ll_set_upper16_output(debug_probe_unit_id_t unit_id, int channel, debug_probe_split_u16_t part)
{
if (unit_id != DEBUG_PROBE_UNIT_HP) {
return; /* LP has only 16 bits to GPIO; probe_top_out[31:16] is not routed */
uint8_t val = (uint8_t)(channel * 2 + DEBUG_PROBE_LL_PART_TO_REG_VAL(part));
if (unit_id == DEBUG_PROBE_UNIT_HP) {
HP_SYSTEM.probea_ctrl.reg_probe_h_sel = val;
} else {
LP_SYS.lp_probea_ctrl.probe_h_sel = val;
}
HP_SYSTEM.probea_ctrl.reg_probe_h_sel = channel * 2 + DEBUG_PROBE_LL_PART_TO_REG_VAL(part);
}
/**
* @brief Read the value that currently being probed
*
* @note ESP32P4 can only route the LSB probe_top_out[15:0] to the GPIO pad. But the register still saves 32 signal bits.
* @note Can only route the LSB probe_top_out[15:0] to the GPIO pad. But the register still saves 32 signal bits.
*
* @return the value that currently being probed
*/