-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
136 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,22 @@ | ||
diff --git a/components/driver/sdspi_host.c b/components/driver/sdspi_host.c | ||
index 4975b857d..c31286047 100644 | ||
index e823ee7fa..79aef3130 100644 | ||
--- a/components/driver/sdspi_host.c | ||
+++ b/components/driver/sdspi_host.c | ||
@@ -622,7 +622,9 @@ static esp_err_t poll_cmd_response(int slot, sdspi_hw_cmd_t *cmd) | ||
*/ | ||
@@ -278,7 +278,7 @@ esp_err_t sdspi_host_init_slot(int slot, const sdspi_slot_config_t* slot_config) | ||
// Initialize SPI bus | ||
esp_err_t ret = spi_bus_initialize((spi_host_device_t)slot, &buscfg, | ||
slot_config->dma_channel); | ||
- if (ret != ESP_OK) { | ||
+ if (ret != ESP_OK && ret != ESP_ERR_INVALID_STATE) { | ||
ESP_LOGD(TAG, "spi_bus_initialize failed with rc=0x%x", ret); | ||
return ret; | ||
} | ||
@@ -623,6 +623,8 @@ static esp_err_t poll_cmd_response(int slot, sdspi_hw_cmd_t *cmd) | ||
static esp_err_t start_command_read_blocks(int slot, sdspi_hw_cmd_t *cmd, | ||
uint8_t *data, uint32_t rx_length) | ||
-{ | ||
+{ | ||
{ | ||
+ go_idle_clockout(slot); | ||
+ | ||
bool need_stop_command = rx_length > SDSPI_MAX_DATA_LEN; | ||
spi_transaction_t* t_command = get_transaction(slot); | ||
*t_command = (spi_transaction_t) { | ||
*t_command = (spi_transaction_t) { |