Hi! I'm back to trying to get SPI to work between a Bela mini and a xiao esp32s3. The Bela is the master/host and the esp32s3 is set to slave/peripheral. It seems like the slave does not detect that the SPI transfer is completed except for when the Bela program is started and the SpiDevice is created, even if no new SPI transfer is started. In its current state, there is one successful transfer on both devices when I start/restart the Bela, and then a series of unsuccessful transfers (i.e. static values) on the bela with no completed transfers reported on the esp32s3. When I restart the esp32s3, the Bela receives one correct transfer, but the esp32s3 is still waiting for its first completed one.
If I move the SpiDevice into the AuxiliaryTask to recreate it for every transfer, the transfers do all finish on the esp32s3, but the content is mostly (but not entirely) rubbish in both directions.
Hookup: 4 6cm wires between SPI pins, bridged ground,
Tried among other things:
- testing and combining different SPI modes
- different clock speeds
- different transfer lengths and offsets between the transfer lengths on the 2 devices
- powering the esp32s3 separately of from the Bela
Bela code:
ESP-IDF code:
Grateful for any thoughts or ideas!