espressif / esp-hosted

Hosted Solution (Linux/MCU) with ESP32 (Wi-Fi + BT + BLE)
Other
683 stars 160 forks source link

Nothing Happens #259

Open hackintoshlover opened 1 year ago

hackintoshlover commented 1 year ago

I am using a Raspberry Pi 4 with Raspbian OS Buster 32bit. Flashed the firmware on a esp32 dev board. Flashed efuse to support emmc. Connected to raspberry pi using sdio pins with pullup-resistors. Compiled esp_hosted-ng, followed all steps. BUT NOTHING HAPPENS. Attached is the dmesg log for your reference. Need Help. Dmesg.txt

mantriyogesh commented 1 year ago

Can you please state the firmware/source code used, esp side logs, raspberry pi side logs (dmesg at that time)?

how much ext pull-up values?

Also, what is the wire length, is it possible to test over pcb? problem is that sdio (any sdio) is very much prone to the signal integrity, and gives issues on manually connected wires.

you can also try to reduce the frequency of sdio and try? FG reference code here: https://github.com/espressif/esp-hosted/blob/master/esp_hosted_fg/host/linux/host_driver/esp32/sdio/esp_sdio.c#L774-L778 copy the piece in your NG's esp_spio.c .

Also, setup image? Finally, timing adjustment to 'NP' could be tried? The default timing is PP. changing to NP is last sort (we know Raspberry Pi follows PP for ESP32 SDIO, suspecting wires introducing timing issues)

hackintoshlover commented 1 year ago

Can you please state the firmware/source code used, esp side logs, raspberry pi side logs (dmesg at that time)?

how much ext pull-up values?

Also, what is the wire length, is it possible to test over pcb? problem is that sdio (any sdio) is very much prone to the signal integrity, and gives issues on manually connected wires.

you can also try to reduce the frequency of sdio and try? FG reference code here: https://github.com/espressif/esp-hosted/blob/master/esp_hosted_fg/host/linux/host_driver/esp32/sdio/esp_sdio.c#L774-L778 copy the piece in your NG's esp_spio.c .

Also, setup image? Finally, timing adjustment to 'NP' could be tried? The default timing is PP. changing to NP is last sort (we know Raspberry Pi follows PP for ESP32 SDIO, suspecting wires introducing timing issues)

Used pre-built firmware from esp hosted releases page https://github.com/espressif/esp-hosted/releases/tag/release%2Fng-v1.0.2

Attached error.txt files contains all logs from esp32 as well as raspberry pi.

Used 10k pull-up resistors with wire length smaller than 10cm, made a breakout board and tested over pcb.

Tried reducing frequency, no effect.

Tried timing adjustment, no effect.

Error.txt esp32 console log.txt

hackintoshlover commented 1 year ago

Hi, Any help here?

mantriyogesh commented 1 year ago

In esp log, the data path is not started. Have you configured the /boot/config.txt as per documentation?

mantriyogesh commented 1 year ago

Cross check wires continuity and verify the pin numbers again.

Can you please share setup image as well?

mantriyogesh commented 1 year ago

You can also try manual flashing the esp binary on master and use master code on host , with logs added in cases where returns are there in:

https://github.com/espressif/esp-hosted/blob/43267cfee077276907518f3eba53fda93304f736/esp_hosted_ng/host/sdio/esp_sdio.c#L656-L691

mantriyogesh commented 1 year ago

any updates here?

hackintoshlover commented 1 year ago

Hi yogesh, Couldn't post was a bit occupied. I tried all the above steps also tried esp-hosted-fg, still nothing works. I can confirm sdio is working since sdmmc works also raspberry pi dmesg identifies it. Looking at the esp32 serial i don't see a communication being initiated. Any steps you would suggest?

mantriyogesh commented 1 year ago

Actually, in your ESP log, I couldn't see 'start data path' or something like that in the end. that really means that https://github.com/espressif/esp-hosted/blob/43267cfee077276907518f3eba53fda93304f736/esp_hosted_ng/host/sdio/esp_sdio.c#L780 was never called.

This means that esp_probe was failed. generally the reason for probe failing is sdio signal integrity issue. meaning, the cables are prone to interference. small (<6cm cables) and good quality cables, verifying external pull-ups, connecting all grounds of host and slave etc can help.

you can also try 1 bit sdio mode, which faces less signal integrity probs : https://github.com/espressif/esp-hosted/issues/242#issuecomment-1713662854

once tested, you can form integrated pcb to test 4 bit mode.

mantriyogesh commented 10 months ago

is

dtoverlay=sdio,poll_once=off

added in /boot/config.txt?

pls send output of:

$ cat /boot/config.txt
mantriyogesh commented 10 months ago

Let us know current state, to assist ahead.. If the things working fine, please help to close the issue..