SCI_WRITE .plg plugin to VS1053b takes too long

Writing software for systems that use VLSI Solution's devices as slave codecs to a host microcontroller.
baptiste
User
Posts: 1
Joined: Fri 2022-06-10 20:42

Re: SCI_WRITE .plg plugin to VS1053b takes too long

Post by baptiste »

Hi,
I jump in this topic because I'm facing the exact same issue with an Arduino nano (16Mhz crystal only) with the same VS1053 Codec + MicroSD Breakout - MP3/WAV/MIDI/OGG Play + Record - v4

My program is basically about playing a message with the VS1053 and then let the user record a message ( like a phone recorder). As I always need to load the plugin before it starts to register, those almost 5 seconds loading time are just too much !! Less than a second loading time would be the maximum reasonable time to be sure not to lose any of the user's message.

My problem is (that I'm just a hobbyist :roll: ) and not really able to understand how to implement the solution.
My Sketch make so far a very classical usage of the Adafruit VS1053 library, and I haven't touched any parameters concerning the SPI speeds.

If I understood well, the solution is to implement the following code (edit : plus the VS1053_CONTROL_PATCH_SPI_SETTING i guess), but where ? It looks like a class from a library.

Code: Select all

void Adafruit_VS1053::sciWritePatch(uint8_t addr, uint16_t data) {
#ifdef SPI_HAS_TRANSACTION
  if (useHardwareSPI)
    SPI.beginTransaction(VS1053_CONTROL_PATCH_SPI_SETTING);
#endif
	//unmodified code 
As a bonus, if you could also let me know how to implement the code bite that allowed you to achieve only 0,35 sec instead of 0,6 sec, I would be very grateful !

Thanks in advance for your help :)
Post Reply