Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 5 of 5

Thread: SD card speed on Teensy 4.0 vs. Audio Board

  1. #1
    Member
    Join Date
    Mar 2019
    Location
    Hoboken, New Jersey, USA
    Posts
    63

    SD card speed on Teensy 4.0 vs. Audio Board

    Is there a difference in read/write speed of SD card between the one soldered directly onto Teensy 4.0 vs. one on the new Audio Board?
    I'd like to use the one on Teensy 4.0, but I also need the USB host contacts and using them both doesn't seem to be possible.
    Will I be able to record audio from the Audio Board onto it's SD card? At what rate?

    Thank you.

  2. #2
    Senior Member+ MichaelMeissner's Avatar
    Join Date
    Nov 2012
    Location
    Ayer Massachussetts
    Posts
    3,317
    Quote Originally Posted by Andy Belov View Post
    Is there a difference in read/write speed of SD card between the one soldered directly onto Teensy 4.0 vs. one on the new Audio Board?
    I'd like to use the one on Teensy 4.0, but I also need the USB host contacts and using them both doesn't seem to be possible.
    Will I be able to record audio from the Audio Board onto it's SD card? At what rate?

    Thank you.
    Well the Teensy 4.0 does not come with a SD card soldered on to it. You have to do the soldering. On the beta units, Paul's breakout board for the Teensy 3.x audio shield brought out both SD card and the USB host pins. In addition, the other two breakout boards announced both have the SD card and USB broken out.


    In terms of speed, the audio shield only has a single data bit, while the boards connected to the 1mm pins underneath the Teensy 4.0 have 4 pins to send data in parallel. So it should be much faster.

  3. #3
    Member
    Join Date
    Mar 2019
    Location
    Hoboken, New Jersey, USA
    Posts
    63
    Appreciate the response, Michael.
    I guess the short answer is "4 times faster", but "paint in the neck, if you can't afford the breakout board due to size constraints and need the host USB".

    I really wish for Teensy 4.1 to have the 2 USB host contacts not under the SD card.

    I'm getting my new Audio Board today or tomorrow and will check the recording speed on it.
    Will report.

  4. #4
    Senior Member
    Join Date
    Nov 2012
    Posts
    271
    Quote Originally Posted by Andy Belov View Post
    Appreciate the response, Michael.
    I guess the short answer is "4 times faster", but "paint in the neck, if you can't afford the breakout board due to size constraints and need the host USB".

    I really wish for Teensy 4.1 to have the 2 USB host contacts not under the SD card.

    I'm getting my new Audio Board today or tomorrow and will check the recording speed on it.
    Will report.
    I recently released SdFat-beta with support for the Teensy 4.0 uSDHC pins.

    Here are results for the bench example using uSDHC. About 22 MB/sec read write.
    Code:
    FILE_SIZE_MB = 5
    BUF_SIZE = 512 bytes
    
    write speed and latency
    speed,max,min,avg
    KB/Sec,usec,usec,usec
    21834.06,3014,22,23
    22026.43,52,22,22
    
    
    read speed and latency
    speed,max,min,avg
    KB/Sec,usec,usec,usec
    22624.43,133,22,22
    22624.43,1096,22,22
    Here is SPI assuming the uSD is the only SPI device. About 3.7 MB/sec.
    Code:
    FILE_SIZE_MB = 5
    BUF_SIZE = 512 bytes
    
    write speed and latency
    speed,max,min,avg
    KB/Sec,usec,usec,usec
    3728.56,4615,136,137
    3736.92,152,136,136
    
    read speed and latency
    speed,max,min,avg
    KB/Sec,usec,usec,usec
    3759.40,137,135,136
    3765.06,137,135,135
    Here is SPI assuming the uSD shares SPI with another device. About 470 KB/sec write and 1006 KB/sec read.
    Code:
    FILE_SIZE_MB = 5
    BUF_SIZE = 512 bytes
    
    write speed and latency
    speed,max,min,avg
    KB/Sec,usec,usec,usec
    476.96,18551,196,1073
    469.57,20260,196,1090
    
    read speed and latency
    speed,max,min,avg
    KB/Sec,usec,usec,usec
    1006.04,1865,371,508
    1012.56,1830,371,505
    This is with a transfer size of 512 bytes. Shared SPI speed will be greater with larger transfers.

  5. #5
    Member
    Join Date
    Mar 2019
    Location
    Hoboken, New Jersey, USA
    Posts
    63
    Thanks for sharing, Bill.
    What a dramatic difference!
    I guess I'll design my board for soldering Teensy 4 so that I can use both the USB host port and the on-board SD reader.
    Looks like it was already done.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •