slow spiwrite() when uploading plugin to VS1053 via the M0

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
raythilist
 
Posts: 3
Joined: Fri Jul 09, 2021 9:27 pm

slow spiwrite() when uploading plugin to VS1053 via the M0

Post by raythilist »

Hello,

Related hardware:
  • VS1053 Codec + MicroSD Breakout - MP3/WAV/MIDI/OGG Play + Record - v4
  • Adafruit Feather M0 with RFM95 LoRa Radio
Goal:
  • record voice in ogg format using VS1053; controlled by feather M0.
What's working:
  • clear audio recorded and stored in SD card (supported by the VS1053 shield)
What's the problem:
  • the plugin for the VS1053 to record in an ogg format takes 4 seconds to load from the SD card to the VS1053 RAM.
    • Context in picture below:
      SPI problem.png
      SPI problem.png (134.91 KiB) Viewed 164 times
      A simple micro() is placed before and after the PrepareRecordOgg() function
In the Adafruit VS1053 Library. I have found that PrepareRecordOgg() uses loadPlugin(), which uses sciwrite(), which uses spiwrite().

spiwrite() takes 37us to write a byte (measured using the micro() timer). I think this is much too slow for SPI. Or am I wrong and this is normal?

What are some strategies to reduce the 4 second load-time for the plugin?

Thank you,
Ray

User avatar
raythilist
 
Posts: 3
Joined: Fri Jul 09, 2021 9:27 pm

Re: slow spiwrite() when uploading plugin to VS1053 via the

Post by raythilist »

Is there additional information I can provide to generate replies?

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”