Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By msurguy
#44593 Very informative thread here.

I wonder if it is possible to have ESP module read an SD card that is also hooked up to another device at the same time. For example a camera can store images on the sd card and ESP module could read the images and stream them over WiFi.

Did anybody do an experiment like that?

Thanks!
User avatar
By picstart
#44615 Multiple devices accessing the SD card.
Assuming the interface is SPI then one and only one can access the card at a time. Each device wishing to access the card would need to check if the SD card has its CS pulled low.
Now the issues arise if a device releases the CS before completing a task in that case the context has to be preserved so that upon regaining access it can resume otherwise all transactions against the card will be blocking until completed.
Initialization of the SD card needs to be done but the pointers into that translate logical addresses to physical blocks will require storing for context. Possibly this will be messy to implement as non blocking and difficult to troubleshoot.
User avatar
By xbary
#44648 Or add to the system even further PIN (name: USE_CARD) indicating that the card during the transaction. Then the second MCU wanting something from SD cards most commonly have to wait until the card is free.