0

I have an ESP32 set to an SPI Master with 100kHz, Mode 2 and just want to send 0x19 to the RPi4 as a slave running pigpiod and using shell for output. When I use piscope, everything seems fine for me on the pins:

PiscopeScreenshot

But pigs bscx 0x213 or also pigs bscx 0x21B always just returns 1 18 so an empty buffer.

From RPi Perspective the connections are as following:

  • CE0: GPIO 8 - Pin24 ->> ESP32 - GPIO 5 (CS)
  • MISO: GPIO 9 - Pin23 ->> ESP32 - GPIO 23 (MOSI)
  • MOSI: GPIO 10 - Pin 19 -- not connected
  • SCLK: GPIO 11 - Pin23 ->> ESP32 - GPIO 18 (SCLK)

What could be wrong? I had it once working yesterday, but kind of unstable. I do not know what I could have changed, but now nothing works.

1 Answer 1

0

I got it working by changing the ESP32 sending to 2 bytes. The examples from https://abyz.me.uk/rpi/pigpio/pigs.html#BSCX are working so the issue must be within the ESP32 sending.

Important: BSC-MISO is GPIO 10 and not GPIO9 in "slave" mode. My wiring was wrong.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.