MultiMaster SPI?

Hi,

I'm using the Atmega1284p with the MightyCore Bootloader. The Mega writes log-files to an SD Card via the Hardware-SPI bus. The Mega ist needed in the circuit because of the many pins provided. Since the device will be mounted in a case, there is no simple way to acces the SD.

My idea was to use a ESP8266 to make the SD available for FTP Server, so it would be possible to get files over wifi!

When selecting a special menu entry, the MEGA would power up the ESP8266 and shut down communication on its own bus.

Would there be any issue with this idea? Or is it impossible to have two hardware-masters on a SPI bus??

Or is it impossible to have two hardware-masters on a SPI bus??

No, you will damage the components.

Would there be any issue with this idea?

No, not if done correctly. But you have to ensure that never both boards access the SPI bus and that all SPI pins are configured as inputs while the other board is accessing the bus.