-
Notifications
You must be signed in to change notification settings - Fork 183
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
The use of spi interface of ESP32-C6-DevKitC-1 module in Linux system #578
Comments
Any GPIO pins could be used. We recommend using IO_MUX pins, but diferent pins than io mux are used, still would be routed through GPIO matrix. When you change the pins, change the code accordingly and the hardware connections as well accordingly. Should you face any issues, attach full textual log:
|
Thank you for your quick reply Here are my questions: I loaded the esp32_spi.ko module on the st platform, and it did not report any error. Besides, I connected the four pins clk, spid, spiq and cs of esp32 spi, but I failed to see the wlan0 node root@myd-yf13x: eth0 Link encap:Ethernet HWaddr B6:87:A1:77:17:4C eth1 Link encap:Ethernet HWaddr BE:70:FA:58:DA:F2 lo Link encap:Local Loopback usb0 Link encap:Ethernet HWaddr 1E:8D:06:00:62:E3 |
If you only connect four pins, this shows that you have not followed the documentation. I would request you to go through the documentation first. Also check the porting guide. Documentation includes all steps to get the wifi working |
Thanks for the heads-up, I think I've looked at https://docs.espressif.com/projects/esp-dev-kits/zh_CN/latest/esp32c6/esp32-c6-devkitc-1/user_guide.html that the content of the above, Here is the user guide for the esp32-c6 I would like to know which document and migration guide you mentioned can be sent out for my reference, I really need the working steps of esp32-c6 for configuration |
You have raised issue in ESP-Hosted project, so expect you to see ESPHosted documentation? |
I have connected the spi lines correctly, and testing spi communication individually is fine, but I have a problem loading the module The node cannot come out ifconfig -a eth0 Link encap:Ethernet HWaddr B6:87:A1:77:17:4C eth1 Link encap:Ethernet HWaddr BE:70:FA:58:DA:F2 lo Link encap:Local Loopback usb0 Link encap:Ethernet HWaddr 0E:88:AC:DE:F4:E3 |
How many pins connected? Can you send a camera photo ? |
A total of 7 pins are configured This is the esp32-c6 module information I (435) stats: ********************************************************************* I (606) hci_uart_config: set rts:-1, cts:-1. I (610) hci_uart_config: set baud_rate:921600. I (615) hci_uart_config: set flow_ctrl:0. I (619) uart: ALREADY NULL I (691) FW_SPI: Using SPI interface |
I can't figure out the length of jumper cables, in general restrict length to use <=10cm wires for spi.
Is big issue. If it was bit shifted would have tried other spi mode like spi mode 3. But offset is zero. One way is to check with spidev. For ESP module to world you would already have disabled the spidev (if this is new, unknown, let us know if not already done). To let spidev load, you might have to re enable temporarily and test the spi 4 pins validity with spidev. It doesn't mandatorily need to be spidev, any user space easy application (python spi user space?)if can confirm spi is working should be sufficient. The spi transaction right now is only from host to slave. What happened other side? Does dmesg or /var/log/messages or /var/log/kernel.log log shoe'init' event received? Or at least similar error? First message in verification sequence is host rx.. |
I have tested the spi communication, he is no problem, can send and receive, if it is worried about the connection is too long, I have configured the spi rate in the driver, so that he first run at a low speed, I want to know sp32_spi: process_rx_buf: offset_rcv[0]! = exp[12], drop the possible reasons for this problem |
As I explained, first message is not through. Means, the spi 4 lines are yet not behaving how they should. esp-hosted/esp_hosted_ng/host/main.c Line 291 in 06ed6a8
the buffer incoming was dropped at esp-hosted/esp_hosted_ng/host/spi/esp_spi.c Line 233 in 06ed6a8
If you add the hex dump trace at line, esp-hosted/esp_hosted_ng/host/spi/esp_spi.c Line 222 in 06ed6a8
Worth to check if there is random data or all zeros. Possible reasons:
The debug way is step-wise but slower. The most easy way and fast way is to attach the logic analyser and send us the capture. With analyser, we would see it clearly.. "दूध का दूध, पानी का पानी" ! |
insmod esp32_spi.ko eth1 Link encap:Ethernet HWaddr BE:70:FA:58:DA:F2 lo Link encap:Local Loopback usb0 Link encap:Ethernet HWaddr A2:1C:7C:AC:3D:70 I have eliminated the bit offset error, but there is still no wlan node, I need to choose which firmware |
by running ifconfig, you are not magically going to get wlan0. Better check the issue and logs for failure and the steps I had mentioned earlier, where to look.. |
Did the dmesg show init event? |
Checklist
Issue or Suggestion Description
I am using the wifi Bluetooth module of ESP32-C6, I let my development board communicate with esp32 through spi,
I have burned the firmware of esp32, and I can see the information of esp32 through ttl, but after I connect the pins in the following picture to the development board, I also loaded the esp32_spi.ko file,
but did not see the generation of wlan0. Please help me confirm whether my wiring is correct and there is something missing in my operation.
Thank you very much for your support
esp32 log.txt
The text was updated successfully, but these errors were encountered: