I am puzzled by the comments on the Wiki;
https://wiki.seeedstudio.com/xiao_esp32s3_pin_multiplexing/
about using the SD card and having another SPI device on the bus.
The Wiki says;
“The solder pad interfaces provided on the Sense expansion board allow users to select the required functions. Among them, the function of the J3 solder pad is to enable the SPI or SD card functionality”
This implies that if your using the SD card, with J3 made so that there are 4K7 pullups active on SCK, MISO and MOSI you cannot use another SPI device on the bus, Why would this be the case, SPI is a bus and is specifically intended to support multiple devices each with their own CS pin ?
In addition, the Wiki says that if you want to use the SPI bus,for another SPI device presumably, you need to break J3. The impact of breaking J3 is to connect each of the SCK, MISO and MOSI pins to each other through a pair of 4K7 resistors, which is not an arrangement I have seen before on a working SPI bus.
i think because there is an sd card slot on the expansion board j3 is the chip enable for the sd card… so to spi another device you would need to chip enable on another pin im thinking… but i am not an expert
Hi, if you don’t subtract JP3, both SPI devices will appear to be using the same CS line and will conflict.
I dont understand that at all.
Pull ups on SPI chip enables on SPI devices are common, they ensure that a device on the SPI bus is not accidently enabled by a floating chip enable for that device. Suggesting the pull up is removed (subtract JP3) to prevent a conflict is something I cannot follow.
I have the SD card and another SPI device (LoRa) working quite happily and reliably together, J3 has been left in place, there is no conflict, which is what I would expect.
Granted you dont actually need pullups on SPI device chip enables, just set up the GPIO pin driving the chip enable and set it high.
But needing to have MOSI, MISO and SD_CS connected together with resistors, when there is more than one SPI device on the bus is a bit odd, certainly never seen an arrangement like that before.
Q1: When XIAO ESP32S3 Sense and Round Display are used together, do I have to cut the J3 pin? Which SD card slot can be used?
A: In principle, you need to cut the J3 pin when XIAO ESP32S3 Sense is used together with Round Display to use microSD card. The reason is that there are pull-up resistors in the design of the circuit of both expansion boards, so theoretically, if two pull-up resistors work at the same time, then the SD card slot will not work properly. An error message of SD card mount failure will appear. Since the pull-up resistor on the Round Display cannot be blocked, you need to cut J3 on the sense expansion board to make sure only one pull-up resistor is working when the two are used together. This also determines that when both are used together, there is and only the SD card slot on the Round Display is active.
However, we need to thank engineer Mjrovai for the new method of using the microSD card slot on the XIAO ESP32S3 Sense at the same time, which is also possible at software level. We can refer to his methods and procedures.
Now that makes sense, thanks.
The SD card slot on the round display also has pullups on the SPI pins, and two sets of pullups is not a good idea.
Perhaps the Wiki for the ESP32S3 sense board should be a bit more specific on the this issue …