Changing SD Card GPIO

Val52100
Posts: 1
Joined: Thu May 30, 2024 4:53 pm

Changing SD Card GPIO

Postby Val52100 » Thu May 30, 2024 5:34 pm

Hello,
I'm using the exemple pipline_play_sdcard_music to play some music from my SD card to my audio codec on lyrat V4.3.
The code is working fine and compile as it should.
I need to make that exemple working on different GPIO for the SD card.
As far as I understand the GPIO pins for the SD card are set in ESP-adf/components/audio_board/lyrat_v4_3/board_def.h
Initially for the lyrat V4.3 the pins are defined as :

Code: Select all

#define ESP_SD_PIN_CLK            GPIO_NUM_14
#define ESP_SD_PIN_CMD            GPIO_NUM_15
#define ESP_SD_PIN_D0             GPIO_NUM_2
#define ESP_SD_PIN_D1             GPIO_NUM_4
#define ESP_SD_PIN_D2             GPIO_NUM_12
#define ESP_SD_PIN_D3             GPIO_NUM_13
I tried to modify the board_def.h of lyrat_v4_3 as follow :

Code: Select all

#define ESP_SD_PIN_CLK            GPIO_NUM_14
#define ESP_SD_PIN_CMD            GPIO_NUM_15
#define ESP_SD_PIN_D0             GPIO_NUM_16
#define ESP_SD_PIN_D1             GPIO_NUM_17
#define ESP_SD_PIN_D2             GPIO_NUM_18
#define ESP_SD_PIN_D3             GPIO_NUM_19
But it's not changing anything, it seems that somewhere in the ADF or IDF librairies that's something that overwrite the pins.
In the compilation it's saying that the board selected is ESP lyra T V4.3 so I assume I modifided the right file ?
Or could it be the fact that the GPIO 16,17,18,19 are not SPI pins on my board (ESP32-DEVKIT-C) ?

Thank you very much

Valentin

ewerton
Posts: 2
Joined: Wed Jul 17, 2024 9:01 pm

Re: Changing SD Card GPIO

Postby ewerton » Wed Jul 17, 2024 9:05 pm

In my experience, you have to modify get_i2s_pins in board_pins_config.c
I have explored why, but the ESP_SD_PIN* macros in board_def.h don't seem to be used.

Who is online

Users browsing this forum: No registered users and 33 guests