29 lines
992 B
Python
29 lines
992 B
Python
# Battery B (hold / pure status read): 64x10 + 2048 fill + 400ms HOLD + 2048 canary
|
|
# + 0.3s + tail 64x10. During the hold the buffer is empty when the probe lands,
|
|
# so the probe is a pure GET_RECV_LEN (no data movement). If a pure status read inside
|
|
# the post-drain re-arm window still wedges the chip, the canary stalls.
|
|
from probe_bench_lib import *
|
|
|
|
def main():
|
|
s = connect()
|
|
if not send_rounds64(s, 10, 0, "R"):
|
|
finish(s, 1)
|
|
f1 = pattern(640, 2048)
|
|
s.sendall(f1)
|
|
rx, stalled = wait_step(s, 2048, "F1", 3.0)
|
|
if stalled or rx != f1:
|
|
hexdump(rx)
|
|
finish(s, 1)
|
|
time.sleep(0.40) # hold: probe lands on the EMPTY buffer (pure status read)
|
|
f2 = pattern(2688, 2048) # canary fill (exact window size)
|
|
s.sendall(f2)
|
|
time.sleep(0.30)
|
|
tail_base = 2688 + 2048
|
|
for i in range(10):
|
|
s.sendall(pattern(tail_base + i * 64, 64))
|
|
rx, stalled = wait_step(s, 2688, "F2+TAIL", 4.0)
|
|
hexdump(rx)
|
|
finish(s, 0)
|
|
|
|
main()
|