SD-card interface and chip select location (IDF4.1, ESP32 WROVER)
Posted: Thu Sep 14, 2023 10:17 am
Hello,
We are using ESP32 Wrover and IDF 4.1, and are out of IOs. There is an external IO-expander, but no more
ESP-pins which could be transferred behind it (ethernet is taking many IOs).
So one (maybe only) option would be to move sd-card CS signal, and basically just keep it enabled when SD card is used. Seems to work OK.
However IDF does not allow this, but a valid ESP-pin is required. Is there a proper way to get around this ?
Implementation is based on 1-line SD in sd_card_example_main.c
One hack tried is to use for example GPIO_20 and allow it's usage in gpio_config-function (gpio.c), and in GPIO_IS_VALID_GPIO macro (gpio_caps.h).
But is there a risk in this ? It is not routed outside, but I guess exist in the die ?
We are using ESP32 Wrover and IDF 4.1, and are out of IOs. There is an external IO-expander, but no more
ESP-pins which could be transferred behind it (ethernet is taking many IOs).
So one (maybe only) option would be to move sd-card CS signal, and basically just keep it enabled when SD card is used. Seems to work OK.
However IDF does not allow this, but a valid ESP-pin is required. Is there a proper way to get around this ?
Implementation is based on 1-line SD in sd_card_example_main.c
One hack tried is to use for example GPIO_20 and allow it's usage in gpio_config-function (gpio.c), and in GPIO_IS_VALID_GPIO macro (gpio_caps.h).
But is there a risk in this ? It is not routed outside, but I guess exist in the die ?