How to listen to several SPI devices simultaneously

Hi,

I have a Arduino Uno and two modules that shall communicate with the UNO.
Both modules has an SPI interface so I have to use that type of interface.
One module is an Ethernet port module.
The other is a RFM69 module.
Both may communicate with the Arduino at anytime.
How can that be achieved?

Shall the Arduino (SPI master) switch slave select back and forth between the two modules all the time or can a slave notify the master that it got some data to transfer to the master, so the master can select that slave for communication?

There must be some sort of best practice here. Please tell me.

Best regards
oneAU

I doubt that there is a "best practice". SPI is a very loosely designed interface, and whatever works reliably for you should be fine.

can a slave notify the master that it got some data to transfer to the master, so the master can select that slave for communication?

If they have interrupt outputs they can. That would be the preferred method IMO.

Is that normal Arduino interrupts you are referring to or is it a feature in the SPI protocol?

SPI doesn't define anything for interrupts, run a signal from the INT (or whatever it's called on the chips) pin on the peripheral chips (if they have them) to interrupt pins on the Arduino.

I agree with Graynomad's suggestions.

Either the devices have an interrupt (e.g. data ready) output, or you have to frequently poll them and ask if data are ready.