ESP32 as sdio host,how to push the data out through sdio without sdio command?

jason2
Posts: 44
Joined: Thu Oct 26, 2017 11:02 am

ESP32 as sdio host,how to push the data out through sdio without sdio command?

Postby jason2 » Tue Jun 19, 2018 3:14 am

What we need to do:
Fpga as a sdio slave,all we need to do is just push the data out through sdio of esp32,and fpga collect the data.So a series of sdio command is unuseful.ESP32 as a sdio host,how to push the data out through sdio without sdio command?

Best regards!

ESP_igrr
Posts: 2067
Joined: Tue Dec 01, 2015 8:37 am

Re: ESP32 as sdio host,how to push the data out through sdio without sdio command?

Postby ESP_igrr » Tue Jun 19, 2018 4:13 am

I don't think it's possible to "push data" through SDIO without actually sending SDIO commands. But you might be able to avoid sending all the initialisation commands required by SDIO standard if you call sdmmc_host_do_transaction directly. I.e.:

- call sdmmc_host_init to initialize the host
- call sdmmc_host_init_slot to initialize the pins
- call sdmmc_host_set_card_clk to set the desired clock speed
- call sdmmc_host_set_bus_width if you need to use 4-line mode

- prepare sdmmc_command_t structure, setting the following fields:
timeout_ms — set to the desired timeout
slot — the slot you are using
the rest of the fields should be set as in sdmmc_io_rw_extended.

- call sdmmc_host_do_transaction, passing in the slot number and a pointer to sdmmc_command_t structure. This should send the command over SDIO. Your SDIO slave should still respond to the command correctly, otherwise the host may not send the actual data.

Note that this is not something we officially support at the moment. If you find any problem, please let us know and we'll see if we can make some changes to support this use case.

jason2
Posts: 44
Joined: Thu Oct 26, 2017 11:02 am

Re: ESP32 as sdio host,how to push the data out through sdio without sdio command?

Postby jason2 » Tue Jun 19, 2018 9:06 am

- prepare sdmmc_command_t structure, setting the following fields:
timeout_ms — set to the desired timeout
slot — the slot you are using
the rest of the fields should be set as in sdmmc_io_rw_extended.
What is "sdmmc_io_rw_extended"?I Can't find it in sdk.

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: ESP32 as sdio host,how to push the data out through sdio without sdio command?

Postby WiFive » Tue Jun 19, 2018 1:35 pm

sdmmc_cmd.c

jason2
Posts: 44
Joined: Thu Oct 26, 2017 11:02 am

Re: ESP32 as sdio host,how to push the data out through sdio without sdio command?

Postby jason2 » Wed Jun 20, 2018 6:17 am

I can not find "sdmmc_io_rw_extended" in sdmmc_cmd.c


Who is online

Users browsing this forum: No registered users and 127 guests