Closed dc42 closed 7 months ago
I propose that we remove this code from RepRap.cpp:
#if HAS_SBC_INTERFACE
// Keep the SBC task spinning from the main task in standalone mode to respond to a SBC if necessary
if (!UsingSbcInterface())
{
ticksInSpinState = 0;
spinningModule = Module::SbcInterface;
sbcInterface->Spin();
}
#endif
With this code removed, function SbcInterface::Spin() can also be removed.
Code removed, issue believed solved.
As at version 3.5.0-rc.4 method SbcInterface::Spin() is called when in standalone mode. This initialises the SBC SPI interface so that it can receive transfers from a connected SBC and (according to the comments) return a response indicating that RRF is running in standalone mode. However, the SPI interrupt service routine now passes the SPI interrupt on to the WiFi module when not in SBC mode, which results in a hard fault if noise is received on the SBC SS signal. Even if the interrupt was processed using the SBC ISR, it is unlikely that the code would work because the ISR wakes up the SBC task, which doesn't run in standalone mode.
Example hard fault data, from 3.5.0-rc.4: