CANHack sometimes freezes, killing USB on a Raspberry Pi host
Closed this issue · 1 comments
kentindell commented
Sometimes the CANHack library freezes with interrupts locked and this causes the USB to freeze, which causes the USB subsystem in a Raspberry Pi host to fail (requiring a reboot).
A solution is to run the CANHack code on the second core in the RP2040 and use a RAM variable to signal a return code so that if it hangs then at least host does not hang (because USB is driven from the main CPU core).
kentindell commented
Failed due to noise on SPI (which can come from attaching logic analyzer probes where the analyzer isn't grounded). Firmware now tolerates SPI noise and provides a diagnostics API for showing when corrupted register values have happened.