Hello,
When the ESP32 is in SPI slave mode, can the ESP32 start the transaction itself (using the spi_slave driver) without needing the master to pull CS LOW?
This is to save ESP32 pins.
Regards,
Michel
SPI slave - start the transaction without triggering the CS pin
Re: SPI slave - start the transaction without triggering the CS pin
Chip select is integral to addressing devices on the bus in SPI. While you might be able to hack around chip select, if you want to save pins use I2C for your protocol instead.
Re: SPI slave - start the transaction without triggering the CS pin
This is not true.
The term "SPI" is used to describe a wide variety of protocols where a master device communicates with one or more slave devices. Some other SPI slaves use different approaches for synchronization. There's no conceptual reason why slaves should need to use a select wire (but many of them do).
Please stay focus on my question.
-
- Posts: 9708
- Joined: Thu Nov 26, 2015 4:08 am
Re: SPI slave - start the transaction without triggering the CS pin
You could use the GPIO matrix for this; iirc there are two 'virtual pins' on the ESP32 that are always-high and always-low respectively. You could route CS to those to manually select the SPi slave peripheral.
Re: SPI slave - start the transaction without triggering the CS pin
Thank you ESP_Sprite.
Is this solution still operate at high speeds? Even if I keep SPI2 or SPI3 IO_MUX pins for SPI buses.
Another question: Does it work for the ESP32-C series?
Is this solution still operate at high speeds? Even if I keep SPI2 or SPI3 IO_MUX pins for SPI buses.
Another question: Does it work for the ESP32-C series?
-
- Posts: 9708
- Joined: Thu Nov 26, 2015 4:08 am
Re: SPI slave - start the transaction without triggering the CS pin
it should generally work; it's just a callback done before and after the transfer.
Who is online
Users browsing this forum: Baidu [Spider] and 104 guests