Teensy 4.0 using underside SD pads for NAND Flash

turtle9er

Well-known member
Hi,

Been searching for a while and can't seem to find anyone that has done this. I am working on a project that is measuring vibrations and worried about SD card reliability. I have been using a 4.1 with Winbond W25N02 and it works great. However due to size constraints, we are wondering if you could use a teensy 4.0 and use a ribbon cable to connect a NAND chip to the underside SD card pads. Seems I could use normal SPI connections, however just wonder if there would be a performance increase by using SDIO. Before I order more chips, just wanted to see if anyone has done this and if using littleFS is all I would have to do.
 
Those bottom pads on Teensy 4.1 are not SDIO. Check the schematic on the Teensy 4.1 page (scroll down to Technical Information near the end).

A chip like W25N02 won't work on SDIO. The 6 signals it needs are completely different than the 6 signals for SDIO you can access on the bottom of Teensy 4.0.

There are some SDIO memory chips which are essentially the electronics of a small SD cards in a SOIC8 package. I believe Adafruit was stocking them at one time. Sorry, don't have the part number or prior conversations handy, but at least knowing it exists might help?
 
Thanks for that info. Think my original msg was confusing. I am using qspi with the teensy4.1 and W25N02. Just to confirm, I could use the W25N02 if I used normal SPI along with SPINAND in the littleFS library (on the teensy 4.0).
 
Adafruit SPI SD flash card
Here is the product from Adafruit, so if I used the teensy 4.0 underside SD pads, I could use this the same as BUILT-IN, then utilize full SDIO speeds? Currently my data rate is only ~40KB/s, so wonder if worth the hassle when I could just use the normal SPI pins. My only worry is the IMU is also communicating using SPI, so one would have to use SPI and the other SPI1. Thanks again for the help, i've been away from the teensy world for too long, so getting back into it.
 
Here is the product from Adafruit, so if I used the teensy 4.0 underside SD pads, I could use this the same as BUILT-IN, then utilize full SDIO speeds?

Sadly no. It probably could work if you just connect Teensy's 6 SDIO signals directly to the memory chip. But that's not how Adafruit designed their circuit board. If you look at the schematic, you can see 2 of those 6 signals on memory chip aren't even connected. They only wired the 4 signals used by SPI. They also used a slow buffer chip for compatibility with their 5 volt boards, so even with SPI it probably can't work at the maximum 25 MHz speed.
 
Last edited:
Currently my data rate is only ~40KB/s

For speed this slow, you should focus on the software side first, not hardware.

SD cards use 512 byte sectors. You can get much better speed if you collect your data into a buffer of 512 or 4096 bytes and write all of those bytes at once.

SD cards also have infrequent but long latency while the processor inside the card does various media management tasks. You will probably need to use an interrupt-based approach to collect your data at a consistent rate and temporarily store it into a large buffer. Then your main program can write that buffer to the card in 4K chunks. This issue with SD cards is well known and has been discussed many times on this forum. Maybe you can find some of those conversations with search?

Also discussed over and over is the need to share code that demonstrates your problem. We can help quite a lot here when we're able to reproduce or even just see the problem. But helping by blind guessing, and going down the wrong path (hardware vs software) is much less effective. Please consider how you ask questions, because we can help you much more and everyone's time is saved if you explain the real issue and show us what you're really doing.
 
Last edited:
I am using ring buffer and have no issues. I was looking for an alternative to sd card due to vibrations and thought I could just use soldered memory to help. However I found lots of discussions on how to over come sd card issues and vibration, like using adhesive to lock it in place or a physical lock like a screw. Final product would be a custom PCB, so I would utilize this chip with all pins. Just thinking of alternatives if our testing shows the sd card not being reliable during extended high vibrations.
 
Back
Top