I have a project that I am working on where I have a custom board using a XTSDG04GWSIGA SD NAND Flash memory chip.
Recognizing that the XIAO ESP32C3 and the XIAO NRF52840 share a nearly identical footprint for pads, including the battery hookups, I wanted to create a simple breakout board that could be used interchangeably.
Here is my circuit for the SD NAND Flash:
All works fine when I use an NRF52840 and the example SdInfo.ino from SdFat library:
12:16:06.604 -> Assuming the SD chip select pin is: 2
12:16:06.604 -> Edit SD_CS_PIN to change the SD chip select pin.
12:16:06.604 ->
12:16:06.604 -> type any character to start
12:16:13.369 -> init time: 5 ms
12:16:13.369 ->
12:16:13.369 -> Card type: SD2
12:16:13.369 -> sdSpecVer: 2.00
12:16:13.369 -> HighSpeedMode: true
12:16:13.369 ->
12:16:13.369 -> Manufacturer ID: 0XB
12:16:13.369 -> OEM ID: XT
12:16:13.369 -> Product: X1100
12:16:13.369 -> Revision: 0.1
12:16:13.369 -> Serial number: 0XD82A13BA
12:16:13.369 -> Manufacturing date: 11/2024
12:16:13.369 ->
12:16:13.369 -> cardSize: 507.51 MB (MB = 1,000,000 bytes)
12:16:13.369 -> flashEraseSize: 128 blocks
12:16:13.369 -> eraseSingleBlock: true
12:16:13.369 -> dataAfterErase: ones
12:16:13.369 ->
12:16:13.369 -> OCR: 0X80FF8000
12:16:13.369 ->
12:16:13.369 -> SD Partition Table
12:16:13.369 -> part,boot,bgnCHS[3],type,endCHS[3],start,length
12:16:13.369 -> 1,0X0,0X3,0X31,0X0,0X6,0X5,0XF5,0XD7,237,990995
12:16:13.369 -> 2,0X0,0X0,0X0,0X0,0X0,0X0,0X0,0X0,0,0
12:16:13.402 -> 3,0X0,0X0,0X0,0X0,0X0,0X0,0X0,0X0,0,0
12:16:13.402 -> 4,0X0,0X0,0X0,0X0,0X0,0X0,0X0,0X0,0,0
12:16:13.449 ->
12:16:13.449 -> Scanning FAT, please wait.
12:16:14.762 ->
12:16:14.762 -> Volume is FAT16
12:16:14.762 -> sectorsPerCluster: 32
12:16:14.800 -> fatStartSector: 238
12:16:14.800 -> dataStartSector: 512
12:16:14.800 -> clusterCount: 30960
12:16:14.800 -> freeClusterCount: 30958
But running the same code with the XIAO ESP32C3 results in this:
12:28:38.877 -> SdFat version: 2.2.2
12:28:38.877 ->
12:28:38.877 -> Assuming the SD is the only SPI device.
12:28:38.877 -> Edit DISABLE_CS_PIN to disable an SPI device.
12:28:38.877 ->
12:28:38.877 -> Assuming the SD chip select pin is: 4
12:28:38.877 -> Edit SD_CS_PIN to change the SD chip select pin.
12:28:38.877 ->
12:28:38.877 -> type any character to start
12:28:44.379 ->
12:28:44.379 -> SD initialization failed.
12:28:44.379 -> Do not reformat the card!
12:28:44.379 -> Is the card correctly inserted?
12:28:44.379 -> Is there a wiring/soldering problem?
12:28:44.379 -> Is SD_CS_PIN set to the correct value?
12:28:44.379 -> Does another SPI device need to be disabled?
12:28:44.379 -> SD errorCode: SD_CARD_ERROR_CMD0 = 0x1
12:28:44.379 -> SD errorData = 0x3
12:28:44.379 ->
12:28:44.379 -> type any character to start
To confirm, I am using the Arduino IDE 2.3.6 with the XIAO_NRF52840 or the XIAO_ESP32C3 board configs selected on upload.
Any idea or am I missing something?