how can I program SPI to select more than only one slave device with any GPIO ?
SPI Routine "spi_master_int" can select SPI0 or SPI1 only with one dedicated GPIO as Slave-Select Signal.
how can I program SPI to select more than only one slave device with any GPIO ?
SPI Routine "spi_master_int" can select SPI0 or SPI1 only with one dedicated GPIO as Slave-Select Signal.
I think Reinhard is referring to the spi configuration source from the SDK (spi_master.c), which expects SPI_PSELSS0 or SPI_PSELSS1 to be defined to a specific GPIO line. spi_master_tx_rx asserts the defined GPIO line during the SPI transaction.
If you have a multidrop SPI bus, then this clearly won't work. But it would be a trivial matter to adapt your own version of spi_master_tx_rx that took the SS line as a parameter (assuming CPOL and CPHA are still the same across your devices, of course).
I think Reinhard is referring to the spi configuration source from the SDK (spi_master.c), which expects SPI_PSELSS0 or SPI_PSELSS1 to be defined to a specific GPIO line. spi_master_tx_rx asserts the defined GPIO line during the SPI transaction.
If you have a multidrop SPI bus, then this clearly won't work. But it would be a trivial matter to adapt your own version of spi_master_tx_rx that took the SS line as a parameter (assuming CPOL and CPHA are still the same across your devices, of course).