You have two options: two SPI masters (peripheral devices) - each connects just to one slave or one SPI master and two slaves connected.
Two SPI masters:
Two SPI masters:
- each SPI master provides SCLK, MISO and MOSI (and nCS signal)
- each SCLK can have a different speed, even a different SPI mode
- because just one slave connected to one master: even nCS might not be needed (slave could be connected all the time
- both SPIs are separate, you need more wires (from two SPI masters, all separated, to one slave on each)
- here, the SPI master provides (the same) SCLK, MISO and MOSI to both slaves (in parallel)
- you need TWO nCS signals, exclusive, one or the other slave selected
- the SCLK speed (and mode) is the same for both devices - check if possible for your slave devices
- you need less GPIOs and just one SPI master code (driver)
- but if your slave devices are different in terms of SCLK speed and SPI mode - you have to reconfigure all the time when
accessing one or the other SPI slave
Statistics: Posted by tjaekel — Sun Sep 01, 2024 8:12 pm