Multiplexing two SPI Master

Status
Not open for further replies.

wat007

Junior Member level 3
Joined
Apr 28, 2009
Messages
27
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,283
Activity points
1,455
Is it possible to switch two master SPI lines using Quad 2:1 multiplexer like (74HC257)? I want my two Master devices to access a single SPI slave (Flash). SPI speed is 4MHz. Please see attached schematics.

The reason for this is that, I have an MP3 module (master2) which already has a flash that I want my MCU (master1) to access the data from. I don't have control on SPI lines of MP3 (Master2).
 

Hi,

Your multiplexing should work.

MISO doesn't need to be switched.
I'd add a pullup resistor at !CS of flash.

You need an arbitration before switching MUX to prevent data corruption.

Klaus
 

Thanks KlausST, I will post my results soon.
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…