metronome/hardware/eda/circuits
Me Here c625a8aaa2 Firmware push fix on both Kit (0.0.24) + Explorer (0.0.4)
Diagnosed from the user's console output - 25 chunks pushed cleanly at
~124ms each, then stalled. Two coupled causes:

1) Bus contention. tick() and Live sync share self.midi with the chunk
   ACKs. While the device was processing a chunk, a Note On / Clock Out /
   Live-sync FULL heartbeat could land on the same MIDI OUT stream and
   the host's parser dropped the interleaved ACK SysEx.

   Fix: self._fw_pushing flag set on 0x21 BEGIN, cleared on 0x23 COMMIT
   or any error. midi_send / Clock Out / _sync_broadcast / _sync_broadcast_full
   all early-out when _fw_pushing is True. Only ACKs go out during a push.

2) SysEx assembler garbage. self._sx = bytearray() per chunk leaks ~70
   bytes / chunk that only GC'd every 50 chunks. 25 chunks of trash plus a
   slow heap walked the wrong way explains the ramp-up to 174 -> 119 -> 124
   ms ACK times. GC every chunk now (~30ms cost on RP2040/RP2350 with
   small heap) so the assembler buffer is always fresh.

Same patch on both pico-cp/ and pico-explorer/ since the bug is identical.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-30 22:51:46 -05:00
..
audio_chain.py PM_K-1 hardware: integrate audio chain into one netlist (dedup shared parts) 2026-05-30 20:41:39 -05:00
mcu_core.py PM_K-1 hardware: RP2350 core (MCU + flash + crystal + USB + boot/reset + SWD) 2026-05-30 21:56:12 -05:00
power_tree.py PM_K-1 hardware: power tree (USB 5V -> +/-18V switcher -> clean +/-15V LDOs + 3V3) 2026-05-30 20:53:44 -05:00
rtc.py Firmware push fix on both Kit (0.0.24) + Explorer (0.0.4) 2026-05-30 22:51:46 -05:00
stage1_input.py PM_K-1 hardware: verify THAT1240 against datasheet; fix pinout + part numbers 2026-05-30 19:48:41 -05:00
stage1b_select.py PM_K-1 hardware: resolve TQ2SA relay pinout; Stage 2 DAC + reconstruction filter 2026-05-30 20:06:26 -05:00
stage2_dac.py PM_K-1 hardware: resolve TQ2SA relay pinout; Stage 2 DAC + reconstruction filter 2026-05-30 20:06:26 -05:00
stage3_sum.py PM_K-1 hardware: Stage 3 -- summing node (selected input + click) 2026-05-30 20:15:17 -05:00
stage4_driver.py PM_K-1 hardware: Stage 4 -- balanced output driver (completes the audio chain) 2026-05-30 20:27:04 -05:00