I have an SD Card connected via SPI1, and managed using the SDFat library. This implementation of SPI uses DMA.
I also have an MQTT connection over TCP. One use case in my product reads a bunch of log entries off of the SD Card and publishes them via MQTT. This is a higher volume of traffic than otherwise my device normally requires out of either the SD Card or the TCP connection. This is in a multi-threaded application.
On the Photon (v0.6.3), when I start pulling logs, it quickly permanently hangs the main application thread on SDFat’s call to the SPI transfer fn. However, it only does this when I’m also publishing those packets over TCP.
On the Electron (v0.6.4) everything runs fine.
My theory is that there is some kind of conflict on the internal Particle implementation of SPI, since the photon does networking over SPI, while the Electron does it over USART.
Has anyone else experienced this? How can I avoid the call to SPI transfer from locking up? Is there something that isn’t fully threadsafe on the SPI implementation with respect to using Photon networking and SPI1 at the same time?