Closed dzid26 closed 3 months ago
Are you connected to a PC? Might be a race condition with USB enumeration in the ST bootloader.
This is on C3X. I have it connected to 12V for this test.
Seems to me this is an SPI communication issue:
./recover.py
only gets stuck when pandad.py
is active. pandad.py
errors out when that happens.
selfdrive/pandad/spi.cc: 1 / 0x0 / 7 / 12 / tx: 14141414141414
selfdrive/pandad/spi.cc: SPI: timed out waiting for ACK, waiting for 0x1f
selfdrive/pandad/spi.cc: 1 / 0x0 / 7 / 12 / tx: 14141414141414
selfdrive/pandad/spi.cc: SPI: timed out waiting for ACK, waiting for 0x1f
selfdrive/pandad/spi.cc: 1 / 0x0 / 7 / 12 / tx: 14141414141414
selfdrive/pandad/spi.cc: SPI: timed out waiting for ACK, waiting for 0x1f
selfdrive/pandad/spi.cc: 1 / 0x0 / 7 / 12 / tx: 14141414141414
selfdrive/pandad/spi.cc: SPI: timed out waiting for ACK, waiting for 0x1f
selfdrive/pandad/spi.cc: 1 / 0x0 / 7 / 12 / tx: 14141414141414
and so on...........
./recover.py
will show 0 dfu devices, even after trying againpandad.py
and then killing it, the ./recover.py
will show list dfu device again.Looks like some clash when accessing SPI.
Oh yeah, this is expected since the ST bootloader state machine is super sensitive. recover.py
doesn't take an exclusive lock over the SPI device, so pandad
's comms still go through.
Panda (C3X) doesn't always enter DFU when running
recover.py
.I tried rebooting and entering dfu manually. After that it would either work many times and or repeatedly not find dfu.
Steps to reproduce:
/data/openpilot/panda/board/recover.py