You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to the SPI lib reference the usage of SPI.beginTransaction() and SPI.endTransaction() allows to restrict SPI access to a specific device. It seems like the SD lib uses SPI.endTransaction() after init and as part of erase methods only.
Freeing the SPI resource after usage for classes Sd2Card and SdVolume is missing as well. Would it make sense to check if the SD lib frees the SPI resource after usage (e.g. writing, reading, etc.) properly?
The text was updated successfully, but these errors were encountered:
I can confirm that the SD card on the shared SPI bus creates a problem and failed to access the card after a while.
For this reason, I had to port to SDFat library and voila, it was a big relief.
According to the SPI lib reference the usage of
SPI.beginTransaction()
andSPI.endTransaction()
allows to restrict SPI access to a specific device. It seems like the SD lib usesSPI.endTransaction()
after init and as part of erase methods only.Sd2Card::init
:SD/src/utility/Sd2Card.cpp
Line 296 in 85dbcca
Sd2Card::chipSelectHigh
:SD/src/utility/Sd2Card.cpp
Line 182 in 85dbcca
uint8_t Sd2Card::erase(uint32_t firstBlock, uint32_t lastBlock)
:SD/src/utility/Sd2Card.cpp
Line 229 in 85dbcca
Freeing the SPI resource after usage for classes
Sd2Card
andSdVolume
is missing as well. Would it make sense to check if the SD lib frees the SPI resource after usage (e.g. writing, reading, etc.) properly?The text was updated successfully, but these errors were encountered: