• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

LyraT-mini SD-card

Q&A Forum › LyraT-mini SD-card
0 Vote Up Vote Down
Doug Clarke asked 3 years ago

I’m trying to get the esp-idf/examples/storage/sd_card/sdspi example to work on the esp32-LyraT-mini card, but I get an 0x107 error when it runs.

The esp-adf/examples/audio_processing/poipeline_alc successfully plays music files on the sd-card, so I know the hardware works.

The audio example calls audio_board_sdcard_init, which has the below code in it, which I’m guessing is setting up GPIO_NUM_32. I’m guessing the sdspi example code is not doing this, but I’m nite sure where/how to add it.

gpio_config_t sdcard_pwr_pin_cfg = {
.pin_bit_mask = 1UL << SDCARD_PWR_CTRL,
.mode = GPIO_MODE_OUTPUT,
.pull_up_en = GPIO_PULLUP_DISABLE,
.pull_down_en = GPIO_PULLDOWN_DISABLE,
.intr_type = GPIO_INTR_DISABLE,
};

gpio_config(&sdcard_pwr_pin_cfg);
gpio_set_level(SDCARD_PWR_CTRL, 0);

Has anyone update the examples to work with the new development boards?

Question Tags: SDCARD ESP-LyraT-mini
2 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 3 years ago

Hi.
Unfortunately, I’m not familiar with audio examples or ESP-IDF.
I found this example for the Arduino core that shows how to play a specific file from the SD card:

  • https://github.com/schreibfaul1/ESP32-audioI2S/wiki#what-audio-events-are-there
  • https://github.com/schreibfaul1/ESP32-audioI2S/blob/master/examples/I2Saudio/I2Saudio.ino

I hope this helps.
Regards,
Sara
 
 

0 Vote Up Vote Down
Doug Clarke answered 3 years ago

Hi Sara,
I figured this one out. The code has just not been updated for their new development board. if the following is added to the code it works. They added a FET to turn on and off the power to the SD card.

#define SDCARD_PWR_CTRL 13

 
 
at the top of main, add the following.
 

// Turn SD card on
gpio_config_tsdcard_pwr_pin_cfg = {
.pin_bit_mask = 1UL << SDCARD_PWR_CTRL,
.mode = GPIO_MODE_OUTPUT,
.pull_up_en = GPIO_PULLUP_DISABLE,
.pull_down_en = GPIO_PULLDOWN_DISABLE,
.intr_type = GPIO_INTR_DISABLE,
};

gpio_config(&sdcard_pwr_pin_cfg);
gpio_set_level(SDCARD_PWR_CTRL, 0);

 
I’m sure the same problem will occur when using the Arduino examples on the esp32-LyraT-mini card.
 

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025
  • [eBook Updated] Learn ESP32 with Arduino IDE eBook – Version 3.2 April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.