Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

esp32p4 spi 4 line mode host function too slowly (EHM-27) #25

Open
3 tasks done
skylin008 opened this issue Jan 10, 2025 · 50 comments
Open
3 tasks done

esp32p4 spi 4 line mode host function too slowly (EHM-27) #25

skylin008 opened this issue Jan 10, 2025 · 50 comments
Labels
Status: Opened Issue is new

Comments

@skylin008
Copy link

Checklist

  • Checked the issue tracker for similar issues to ensure this is not a duplicate.
  • Described the feature in detail and justified the reason for the request.
  • Provided specific use cases and examples.

Feature description

esp32p4 spi 4 line function, used 40M clock, max speed only 1 MiB, does it can be 5 MiB reachable.

Use cases

esp32p4 connect esp32c5 wifi module via SPI 4 Line mode, used FTP protocol download file from FTP server via esp32c5 wifi,it only 1 MiB download speed , how to solve this issue. Thanks!

Alternatives

None

Additional context

None

@mantriyogesh
Copy link
Collaborator

Are you using https://github.com/espressif/esp-hosted or
https://github.com/espressif/esp-hosted-mcu ?

Sate the sdkconfig, spi clock in use and raw transfer speed (in both directions)

@mantriyogesh
Copy link
Collaborator

@skylin008 let us know some details to understand the issue better..

@skylin008
Copy link
Author

@mantriyogesh Thanks for you support. Yes, I used the https, esp32c5 for spi slave , and esp32p4 for spi master. I used the FTP protocol transfer file. Attach esp32c5 and esp32p4 sdkconfig
Uploading sdkconfig.zip…

@mantriyogesh
Copy link
Collaborator

The file you uploaded , could not complete. Can you please state if your normal functionality is working. The issue is only in download speed.

1MiB, meaning around 8-8.5mbps speed. This is limited by the clock. What is the SPI actual clock on the clock line?

Also, can you please click a photo how you connected the p4 and c5?
As you are using p4-c5, you can also use QSPI, which with almost similar number of wires (1 extra) can bump the speed a lot.

@mantriyogesh mantriyogesh transferred this issue from espressif/esp-hosted Jan 16, 2025
@espressif-bot espressif-bot added the Status: Opened Issue is new label Jan 16, 2025
@github-actions github-actions bot changed the title esp32p4 spi 4 line mode host function too slowly esp32p4 spi 4 line mode host function too slowly (EHM-27) Jan 16, 2025
@skylin008
Copy link
Author

@mantriyogesh thanks for your support, I will be try!

@skylin008
Copy link
Author

skylin008 commented Jan 17, 2025

@mantriyogesh I had try to QSPI communication between esp32c5 and esp32p4 , esp32p4 io port define as follow:

Image

esp32c5 io port define as follow:

Image

Run the examples/wifi/getting-started/station example, any issue shows, attach the logs:

P4.LOG

C5.LOG

the sdkconfig as bellow:

sdkconfig.txt

@mantriyogesh
Copy link
Collaborator

Can you please click a photo how your connections look like?

@skylin008
Copy link
Author

thanks @mantriyogesh

ESP32P4 ESP32C5
gpio1 gpio7
gpio2 gpio0
gpio3 gpio5
gpio4 gpio4
gpio5 gpio3
gpio6 gpio2
gpio17 reset pin

attach the shematic

MA_1.0.pdf

@mantriyogesh
Copy link
Collaborator

I wanted to see the photo, not schematic..

How are you connecting the QSPI? PCB or jumper cables?

@skylin008
Copy link
Author

From Ours had designed a PCB .

ESP32P4 GPIO PIN <-------> ESP32C5 GPIO PIN
GPIO1 <-------> GPIO7
GPIO2 <-------> GPIO0
GPIO3 <-------> GPIO5
GPIO4 <-------> GPIO4
GPIO5 <-------> GPIO3
GPIO6 <-------> GPIO2
GPIO17 <-------> C5 reset pin

@SohKamYung-Espressif
Copy link
Collaborator

@skylin008 I tested the QSPI between the ESP32-P4 and ESP32-C5. Here are my findings:

My HW setup:

This is the ESP32-P4 Function EV Board. Connected to the GPIO header on the P4 board is a board with a ESP32-C5-WROOM-1 module. The board on the left is a ESP-Prog used to flash firmware to the ESP32-C5.

My QSPI GPIO settings on the C5 slave:

My QSPI GPIO settings on the P4 host:

The SPI CLK is set to 40 MHz.

I ran the iperf example program and these are the results I got

P4 as iperf TCP server:

iperf> iperf -s -i 1 -t 10
I (185754) IPERF: mode=tcp-server sip=localhost:5001, dip=0.0.0.0:5001, interval=1, time=10
I (185755) iperf: Socket created
iperf> I (186648) iperf: accept: 10.10.2.162,53339

Interval       Bandwidth
 0.0- 1.0 sec  24.70 Mbits/sec
 1.0- 2.0 sec  24.60 Mbits/sec
 2.0- 3.0 sec  24.68 Mbits/sec
 3.0- 4.0 sec  24.63 Mbits/sec
 4.0- 5.0 sec  24.72 Mbits/sec
 5.0- 6.0 sec  24.68 Mbits/sec
 6.0- 7.0 sec  24.67 Mbits/sec
 7.0- 8.0 sec  24.69 Mbits/sec
 8.0- 9.0 sec  24.60 Mbits/sec
 9.0-10.0 sec  24.69 Mbits/sec
 0.0-10.0 sec  24.67 Mbits/sec
I (196653) iperf: TCP Socket server is closed.
I (196654) iperf: iperf exit

P4 as iperf UDP server:

iperf> iperf -s -i 1 -t 10 -u
I (235651) IPERF: mode=udp-server sip=localhost:5001, dip=0.0.0.0:5001, interval=1, time=10
I (235652) iperf: Socket created
I (235652) iperf: Socket bound, port 35091
iperf>
Interval       Bandwidth
 0.0- 1.0 sec  35.71 Mbits/sec
 1.0- 2.0 sec  35.72 Mbits/sec
 2.0- 3.0 sec  35.71 Mbits/sec
 3.0- 4.0 sec  35.64 Mbits/sec
 4.0- 5.0 sec  35.77 Mbits/sec
 5.0- 6.0 sec  35.71 Mbits/sec
 6.0- 7.0 sec  35.70 Mbits/sec
 7.0- 8.0 sec  35.75 Mbits/sec
 8.0- 9.0 sec  35.79 Mbits/sec
 9.0-10.0 sec  35.83 Mbits/sec
 0.0-10.0 sec  35.73 Mbits/sec
I (246480) iperf: Udp socket server is closed.
I (246480) iperf: iperf exit

P4 as iperf TCP client:

iperf> iperf -c 10.10.2.162 -i 1 -t 10
I (274300) IPERF: mode=tcp-client sip=localhost:5001, dip=10.10.2.162:5001, interval=1, time=10
I (274304) iperf: Successfully connected

Interval       Bandwidth
iperf>  0.0- 1.0 sec  29.38 Mbits/sec
 1.0- 2.0 sec  29.50 Mbits/sec
 2.0- 3.0 sec  29.75 Mbits/sec
 3.0- 4.0 sec  28.88 Mbits/sec
 4.0- 5.0 sec  29.62 Mbits/sec
 5.0- 6.0 sec  24.12 Mbits/sec
 6.0- 7.0 sec  7.50 Mbits/sec
 7.0- 8.0 sec  7.88 Mbits/sec
 8.0- 9.0 sec  13.88 Mbits/sec
 9.0-10.0 sec  29.50 Mbits/sec
 0.0-10.0 sec  23.00 Mbits/sec
I (284310) iperf: TCP Socket client is closed.
I (284311) iperf: iperf exit

P4 as iperf UDP client:

iperf> iperf -c 10.10.2.162 -i 1 -t 10 -u -b 50
I (291956) IPERF: mode=udp-client sip=localhost:5001, dip=10.10.2.162:5001, interval=1, time=10
I (291957) iperf: Socket created, sending to -1576924662:5001

Interval       Bandwidth
iperf>  0.0- 1.0 sec  42.47 Mbits/sec
 1.0- 2.0 sec  38.18 Mbits/sec
 2.0- 3.0 sec  31.55 Mbits/sec
 3.0- 4.0 sec  30.60 Mbits/sec
 4.0- 5.0 sec  42.21 Mbits/sec
 5.0- 6.0 sec  42.25 Mbits/sec
 6.0- 7.0 sec  42.30 Mbits/sec
 7.0- 8.0 sec  42.20 Mbits/sec
 8.0- 9.0 sec  42.20 Mbits/sec
 9.0-10.0 sec  42.34 Mbits/sec
 0.0-10.0 sec  39.63 Mbits/sec
I (301971) iperf: UDP Socket client is closed
I (301971) iperf: iperf exit

For your reference, here are my sdkconfig files:

skdconfig-for-slave.txt

sdkconfig-for-host.txt

@mantriyogesh
Copy link
Collaborator

We can't exactly test your used GPIOs, but we verified with the board with us, the QSPI is working without issues.

To add up, we also faced the issue of the message not receiving in our QSPI, when we used the jumper wires setup. although, the same issue was not observed when we used wires and 'dualSPI'.

With QSPI over PCB, however such issue was not discovered.

Suggestions:

  1. Try dual SPI first
  2. with QSPI, lower the freq and try
  3. gradually increase the freq and try in iterations, where or when the drivers are getting saturated.

If you need, we can share out schematic over mail. Please find my mail id on the profile.

@skylin008
Copy link
Author

@mantriyogesh SPI test is ok, the clock is 40Mhz, none error information shows.

@mantriyogesh
Copy link
Collaborator

@skylin008 Any updates?

@skylin008
Copy link
Author

@mantriyogesh Thanks for your kindly support. The same issue shows, it can't work correctly, it crash and reboot!

@skylin008
Copy link
Author

Attach the ESP32P4 logs

esp32p4 debug info.txt

Image

@mantriyogesh
Copy link
Collaborator

Check if you have connected the pins correctly. Also ensure the slave 'EN' is connected to your reset pin in the P4 and the C5 gets resets every time the P4 is reset.

There are some suggestions mentioned in here: #25 (comment)

As you say, the SPI test is okay, you can use same pins to test dual SPI first.
I also have shared the schematic with you, with which our board performs just fine. although, there is small issue in the schematic we sent and hence we need the jumper cables flying as you can see the diagram.

But anyway, these jumpers are only for getting C5 into download mode, nothing to do with QSPI. the QSPI pins are through PCB.

At the lease, did you try dual SPI or QSPI with lower frequency like 5MHz?

Apart from this, In prior sdkconfig of the Full-Duplex SPI, I could see

ESP32-P4

CONFIG_ESP_SPI_GPIO_MOSI=4
CONFIG_ESP_SPI_GPIO_MISO=3
CONFIG_ESP_SPI_GPIO_CLK=5
CONFIG_ESP_SPI_GPIO_CS=6
CONFIG_ESP_SPI_GPIO_HANDSHAKE=1
CONFIG_ESP_SPI_GPIO_DATA_READY=2
CONFIG_ESP_SPI_GPIO_RESET_SLAVE=17
..
..
CONFIG_ESP_SPI_CLK_FREQ=40

mapped to:

ESP32-C5

CONFIG_ESP_SPI_GPIO_MOSI=4
CONFIG_ESP_SPI_GPIO_MISO=5
CONFIG_ESP_SPI_GPIO_CLK=3
CONFIG_ESP_SPI_GPIO_CS=2
CONFIG_ESP_SPI_GPIO_HANDSHAKE=1
CONFIG_ESP_SPI_GPIO_DATA_READY=0
CONFIG_ESP_SPI_GPIO_RESET=-1

These pins map to all your pins mentioned in #25 (comment)

except, CONFIG_ESP_SPI_GPIO_HANDSHAKE=1 in P4 was mapped to CONFIG_ESP_SPI_GPIO_HANDSHAKE=1 in C5.

In your recent pins, you mentioned GPIO1 in P4 connected to GPIO7 in C5.

I am confused, which one is correct and real mapping in your schematic.
Can you please review as per your schematic for this pin?

@skylin008
Copy link
Author

Thanks @mantriyogesh , esp32c5 GPIO1 pin to connected to esp32p4 GPIO1 pin in my shematic. I had test the same pin in Full-Duplex SPI, it work ok. For Half-Duplex SPI mode, esp32p4 only add GPIO15 pin to connect esp32c5 GPIO7 pin.

@mantriyogesh
Copy link
Collaborator

  1. Try QSPI with correct gpios with low freq
  2. If 1 fails, try using dual spi and confirm
  3. If 2 fails, Can you please send the c5 and P4 sdkconfig and their logs from the start?

@skylin008
Copy link
Author

Try QSPI with correct gpios with low freq: test fail
If 1 fails, try using dual spi and confirm: test fail
If 2 fails, Can you please send the c5 and P4 sdkconfig and their logs from the start?

esp32c5 debug info_dual spi.txt
esp32c5 debug info_qspi.txt
esp32p4 debug info_dual spi.txt
esp32p4 debug info_qspi.txt

sdkconfig file follow below:

sdkconfig_for_host_dualspi.txt
sdkconfig_for_host_qspi.txt
sdkconfig_for_slave_dualspi.txt
sdkconfig_for_slave_qspi.txt

@mantriyogesh
Copy link
Collaborator

did the standard SPI with these pins worked for you any time?

@mantriyogesh
Copy link
Collaborator

in your logs, I can clearly see

[18:26:04.709]收←◆I (587) gpio: GPIO[42]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 
I (588) fw_dl: sdmmc init success 0x0
Name: VM040 ?
Type: MMC
Speed: 40.00 MHz (limit: 40.00 MHz)
Size: 29895MB
CSD: ver=3, sector_size=512, capacity=61226496 read_bl_len=9
EXT CSD: bus_width=4
E (622) sdmmc_io: sdmmc_io_write_byte: sdmmc_io_rw_direct (write 0x2) returned 0x107
E (622) esp_host: esp_extconn_sdio_start(146): Set function 1 failed
E (624) esp_host: esp_extconn_sdio_init(208): esp host start failed
I (630) extconn: extconn init ret 0x107

The extconn and esp-hosted cannot work together.

Please disable extconn as described in the documentation:

https://github.com/espressif/esp-hosted-mcu/blob/main/docs/spi_full_duplex.md#3-remove-conflicting-configuration

@skylin008
Copy link
Author

did the standard SPI with these pins worked for you any time? Yes

"""The extconn and esp-hosted cannot work together.

Please disable extconn as described in the documentation:

https://github.com/espressif/esp-hosted-mcu/blob/main/docs/spi_full_duplex.md#3-remove-conflicting-configuration
"""
I had disable the extconn, but error information shows, attach the debug file

esp32p4 debug info_qspi.txt

esp32c5 debug info_qspi.txt

@mantriyogesh
Copy link
Collaborator

Currently in the log, It look likes the message exchange for some commands was already successful
wifi init # fine
wifi set country # fine
wifi set ps # not fine at slave

So the QSPI at hardware level seems to be okay. The crash in slave times out the host for the command.

Kindly wait from us to check on this and get back. We will test again and confirm.

By the time, Can you please confirm:

  1. idf exact git commit
  2. git status outout under idf directory
  3. If any changes that you made in iperf example or anywhere apart from GPIO pins?

@SohKamYung-Espressif
Copy link
Collaborator

I just tested with the ESP32C5-board on the ESP32-P4 Dev Kit, and the logs look ok. On the ESP32C5 side, I do not see a crash after the wifi set ps line.

See attached debug log output

esp32c5-20250124-debug-qspi.txt

esp32p4-20250124-debug-qspi.txt

@mantriyogesh
Copy link
Collaborator

Still something is mismatched between us and @skylin008 's either hardware, or software.

As you state full duplex spi works fine, but QSPI doesn't.

Let me compare the schematic in #25 (comment) with ours.

@mantriyogesh
Copy link
Collaborator

mantriyogesh commented Jan 24, 2025

@skylin008 , As you have core dump shared already, can you please send us the c5 binaries and related files to debug the core dump at c5?

Alternative 1) use idf.py monitor for esp logging, instead of minicom or other terminal emulator programs.

Are you using idf.py monitor to see logs at esp32-c5? If so it would auto decode the core dump, where the crash happened.

Alternative 2) collect files manually and send to use for finding the line where it crashed

cd <slave_c5_proj>/build
tar cvzf c5_bins.tgz

  • c5 bin files
  1. build/network_adapter.bin
  2. build/ota_data_initial.bin
  3. build/network_adapter.bin
  4. build/partition_table/partition-table.bin
  • elf files
  1. build/bootloader/bootloader.elf
  2. build/network_adapter.elf
  • map files
  1. build/bootloader/bootloader.map
  2. build/network_adapter.map
  • latest logs
  1. c5 log, P4 log with core dump

You can also run below script and get us c5_core_bundle.tgz

#c5 core bundle
tar cvzf c5_core_bundle.tgz build/flash_args ./partitions.esp32*.csv build/network_adapter.bin build/ota_data_initial.bin build/network_adapter.bin build/partition_table/partition-table.bin build/bootloader/bootloader.elf build/network_adapter.elf build/bootloader/bootloader.map build/network_adapter.map sdkconfig*

Please note:

  1. We would see the crash happened at slave through this.
  2. If you have built the c5 again, please take fresh logs and above set of files.
  3. We would not be able to test unless the pins are adjusted to our pcb GPIOs. Let's go step by step. First we will analyse above logs.

possibly, you can also provide similar set of files for P4

@mantriyogesh
Copy link
Collaborator

@skylin008 , can you please attach the necessary files for crash dump analysis as mentioned above or use IDF.py monitor to get crash log?

@skylin008
Copy link
Author

Thanks @mantriyogesh , attach the p4 logs and c5 logs from idf.py monitor

logs.zip

@mantriyogesh
Copy link
Collaborator

I am quite surprised to see that C5 despite being slave, shows the log similar to 'host'.

For reference successful logs, please refer: #25 (comment)

Are you flashing host on C5 and P4 both?
It would not work this way.

I also compared your old logs. In the old logs, I can see that you were flashing C5 from slave project.
reference (your c5 log from #25 (comment)) :

Image
is correct.

The recent log you attached for c5 is not correct.

Possibly, you are either flashing host on both C5 & P4 (likely), or you are accessing wrong uart port for logs (unlikely).

Can you please create a new project using:
https://components.espressif.com/components/espressif/esp_hosted/versions/1.1.1/examples/slave?language=en

idf.py create-project-from-example "espressif/esp_hosted=<x.y.z>:slave"

where, x.y.z is same to one displayed in your ESP32-P4 log while flashing.

Ensure that you create slave project outside of the esp-idf directory tree?

@skylin008
Copy link
Author

skylin008 commented Feb 9, 2025

Thanks @mantriyogesh, I'm back from vacation. Attatch the latest c5 logs and p4 logs from idf.py monitor.

p4_log.txt

c5_log.txt

@mantriyogesh
Copy link
Collaborator

Great. Thanks for the logs with backtrace in slave side.

(2155) slave_ctrl: Received Req [0x118]
I (2159) phy_init: phy_version 102,3b01d78a,Nov 27 2024,17:24:11
Guru Meditation Error: Core  0 panic'ed (Illegal instruction). Exception was unhandled.

Core  0 register dump:
MEPC    : 0x4000152c  RA      : 0x42083402  SP      : 0x40832800  GP      : 0x40814584
--- Stack dump detected
--- 0x4000152c: __call_phy_bt_tx_gain_init in ROM
0x42083402: register_chipv7_phy at ??:?

TP      : 0x408329b0  T0      : 0x40035ce2  T1      : 0x0000000f  T2      : 0xffffffff
--- 0x40035ce2: memset in ROM

S0/FP   : 0x40815000  S1      : 0x4083be3c  A0      : 0x0000006d  A1      : 0x00000000
A2      : 0x00000006  A3      : 0x00000004  A4      : 0x00000000  A5      : 0x0000001c
A6      : 0x00000000  A7      : 0x408161e8  S2      : 0x40815778  S3      : 0x00000000
S4      : 0x420a3be8  S5      : 0x0038e7ff  S6      : 0x4085ff28  S7      : 0x4004b000
S8      : 0x40860000  S9      : 0x40860000  S10     : 0x4085ff40  S11     : 0x00000000
T3      : 0x00000000  T4      : 0x42027280  T5      : 0x420273d6  T6      : 0x42027172
--- 0x42027280: aes_128_cbc_encrypt at D:/Espressif/frameworks/esp-idf-master/components/wpa_supplicant/esp_supplicant/src/crypto/crypto_mbedtls.c:445
0x420273d6: pbkdf2_sha1 at D:/Espressif/frameworks/esp-idf-master/components/wpa_supplicant/esp_supplicant/src/crypto/crypto_mbedtls.c:752
0x42027172: hmac_sha256_vector at D:/Espressif/frameworks/esp-idf-master/components/wpa_supplicant/esp_supplicant/src/crypto/crypto_mbedtls.c:341

In the slave log confirms that the slave has crashed clearly and host awaited for the request, which it got failure and was marked as Fatal, resulting abort at host.

Now, as I see the crash is null pointer access and in some bluetooth function and embedtls.

My first and very clear guess is that you are using c5 with 0.0 version.

The c5 with eco1(1.0+) are only supported on latest IDF and older c5 get crash with latest IDF. Considering the c5 is not MP yet, these chip revisions are expected. Please note these are hardware revisions, so in worst case you might go back to older IDF commit (unsure which right now), but basically without IDF software support (till some commits it would work, no later), as this chip hardware is deprecated (anyway C5 is not in MP yet).

I also checked/confirmed from your log of eFuse that the chip is 0.0. you can alternatively run esptool.py with chip_id argument.

esptool.py --port <slave-port> chip_id

Please let us know if this c5 is eco1 or later.

@mantriyogesh
Copy link
Collaborator

idf commit, as I found out, espressif/esp-idf@d092c1b

Any C5 eco0 (0.0) c5 would not be able to work ahead this.
At least eco1 is needed (>0.0)

alternatively, you can also see the idf flashing log, which would contain string eco1 or later

[11/26/24 3:18 PM] Lv Haiyu
--- esp-idf-monitor 1.5.0 on /dev/ttyUSB1 115200

--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H

der: 0xf ESP-ROM:esp32c5-eco1-20240726

Build:Jul 26 2024

rst:0x1 (POWERON),boot:0x10 (SPI_FAST_FLASH_BOOT) 

The above trace only holds true for c5 eco1 devices.

@mantriyogesh
Copy link
Collaborator

@skylin008 please let us know further, once you have some observation..

@skylin008
Copy link
Author

Thanks@mantriyogesh, I will be try! If eco0 firmware can be used eco1 devices?

@mantriyogesh
Copy link
Collaborator

yes.

If you can wait a little (unsure how much), you can also try to use eco2 directly.
No guarantees, but eco2 should also have sdio on c5.

Other way around, you can actually downgrade to specific commit in idf and try on existing device, if you are going to wait for eco2. Also, it would rule out the issue is indeed only because of the hardware incompatibility.

Anyway, eco1 is supported on IDF master.

@skylin008
Copy link
Author

@mantriyogesh Thanks for your support! when esp-hosted update to 1.1.2:slave, used eco0 chip, the esp32C5 module keeps restarting approximately every 1 second when used SPI_FULL_DUPLEX. But when used esp-hosted 0.0.22:slave, it can be worked.

@mantriyogesh
Copy link
Collaborator

It would be helpful if you attach both side for quicker resolution on lastest slave. Please also let us know the IDF version in use and all submodules are updated in the esp-idf directory.

Please be informed, if the issue happens in IDF driver(s), there is no way we can support the c5 eco. However if the issue is in hosted, we can certainly fix.

@skylin008
Copy link
Author

The esp-hosted version is: 1.1.2 ,esp-idf version is: ESP-IDF v5.5-dev-847-gcb3ac7429c-dirty, two versions used to eco0 esp32c5 chip can be work well, but them used to the eco1 esp32c5 chip can not be work, esp32c5 can not communication with esp32p4. The above work with SPI_FULL_DUPLEX.

@mantriyogesh
Copy link
Collaborator

espressif/esp-idf@cb3ac7429c > espressif/esp-idf@d092c1b . should not be used on eco0. if it works, mere co-incidence.

Irrespective of transport, please stick with commits. The commits are software, but they are tied to specific hardware.

commit < espressif/esp-idf@d092c1b => eco0
commit >= espressif/esp-idf@d092c1b => eco1

@skylin008
Copy link
Author

what about issue about eco1 can not be communication with each other?

@mantriyogesh
Copy link
Collaborator

Sorry did not understand what exactly you meant can you please detail a bit?

@skylin008
Copy link
Author

The esp-hosted version is: 1.1.2 ,esp-idf version is: ESP-IDF v5.5-dev-847-gcb3ac7429c-dirty, two versions used to eco0 esp32c5 chip can be work well, but them used to the eco1 esp32c5 chip can not be work, esp32c5 can not communication with esp32p4. How about solve eco1 communication issue?

@mantriyogesh
Copy link
Collaborator

  1. There are too many variables. Let us rule out some lower priority scenarios.

  2. If you already have eco1, I would strongly suggest not use eco0, as it is deprecated hardware.

  3. How is eco1 now connected to P4? Is it similar PCB hardware or jumper cables? Can **click a camera ** photo and share?

  4. Please set up Latest master IDF. Ensure all submodules are updated.

  5. Clean build (rm -rf sdkconfig, build/) host with latest IDF. (idf.py fullclean)

  6. Flash host P4 firmware to latest hosted registry component version

  7. Clean build (rm -rf sdkconfig, build/) slave eco1 with latest IDF (idf.py fullclean)

  8. Flash C5 eco1 with new project using 'slave' 'example' inside registry component.

  9. Ensure the spi connections are expected as per your GPIO mapping

  10. Ensure the slave EN is connected to P4's 'Reset' GPIO

  11. RESET P4. This should also reset slave.

  12. Share your observations with the textual logs attached. Without logs we cannot understand.

@skylin008
Copy link
Author

Now esp32c5-wroom ECO1 chip can not be work, can not be flash_download, but ECO0 chip work well.

@mantriyogesh
Copy link
Collaborator

Sorry, but without the necessary logs and specific information, we cannot proceed to even understand the issue.

#25 (comment)

@skylin008
Copy link
Author

c5.txt
p4.txt
Attatch esp32-c5 eco1 chip version and esp32p4 running logs.

@SohKamYung-Espressif
Copy link
Collaborator

@skylin008 From the p4.txt:

I (11562) transport: Not able to connect with ESP-Hosted slave device
I (11562) transport: Reset slave using GPIO[17]
I (11562) os_wrapper_esp: GPIO [17] configured

The P4 is unable to reset the C5. I do not see the C5 rebooting in the c5.txt. This is required to start SPI transactions between the P4 and C5.

Please check that the P4 GPIO used (GPIO 17) is properly connected to the pin used to reset the C5.

Also, the logs indicate that you are running with SPI FD (full duplex) not SPI 4-line mode (SPI half duplex). This is the correct SPI mode? From p4.txt:

I (542) H_API: ESP-Hosted starting. Hosted_Tasks: prio:23, stack: 5120 RPC_task_stack: 5120
spi_mempool_create free:33702128 min-free:33702128 lfb-def:33030144 lfb-8bit:33030144

I (546) spi_wrapper: Transport: SPI, Mode:3 Freq:40MHz TxQ:20 RxQ:20
 GPIOs: MOSI:4 MISO:3 CLK:5 CS:6 HS:1 DR:2 SlaveReset:17

From c5.txt:

I (462) fg_mcu_slave: *********************************************************************
I (471) fg_mcu_slave:                 ESP-Hosted-MCU Slave FW version :: 0.0.6                        
I (481) fg_mcu_slave:                 Transport used :: SPI only                      
I (490) fg_mcu_slave: *********************************************************************

@skylin008
Copy link
Author

@SohKamYung-Espressif Thanks! Yes, I used stand SPI full duplex to run with esp32C5 ECO1 chip.

@SohKamYung-Espressif
Copy link
Collaborator

SohKamYung-Espressif commented Feb 20, 2025

@skylin008 Do you have any updates on the esp32C5 ECO1 chip?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Opened Issue is new
Projects
None yet
Development

No branches or pull requests

4 participants