Closed karlo922 closed 2 months ago
BSC MISO is pin 10 on RPI4b according to docs.
You mean GPIO10 or Pin10? Where do you find that? I now tried GPIO10 but this does not change anything apart that piscope now shows that 10-MOSI gets the signal.
GPIO10 or pin number 19. Here
After trying out the given BitBang example which worked, I tried to change my ESP32 so that it always sends twice - now it works.. Thank you, although I still do not really understand the issue. (with ESP32 sending to GPIO10 like you said) I always 2 byte needed?
It's been a while since I've played with the BSC-SPI peripheral. From the documentation, it appears the LSB of the first byte on MOSI controls whether data is to be written to the BSC-SPI FIFO or read from the BSC-SPI FIFO. So yes, you need to send two bytes to send one data byte.
The BSC slave in SPI mode deserializes data from the MOSI pin into its receiver/ FIFO when the LSB of the first byte is a 0. No data is output on the MISO pin. When the LSB of the first byte on MOSI is a 1, the transmitter/FIFO data is serialized onto the MISO pin while all other data on the MOSI pin is ignored.
I guess all info is here - we can close it.
I have a ESP32 set to an SPI Master with 100kHz, Mode 2 and just want to send 0x19 to the RPi4 running pigpiod and using shell for output. When I use piscope, everything seems fine for me on the pins:![grafik](https://github.com/joan2937/pigpio/assets/77006560/33c1439a-3e5e-4fe6-9ab4-1c0a05a22435)
But
pigs bscx 0x213
or alsopigs bscx 0x21B
always just returns1 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 - Pin 23 ->> 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.