Closed qinyunliu closed 3 months ago
You can choose one from FG or NG, whichever suits your development workflow. Please let us know if you have followed the complete documentation.
I have chosen the NG solution,I modified Makefiel to generate esp32_spi.ko, insmod esp32_spi.ko Only one line of information is displayed "ep32_spi:spi__dev_init: ESP32 peripheral is registered to SPI bus [0],chip select [0], SPI clock [10]" I don't know if this is loading successfully,"ifconfig -a " The port number is not shown wpa_supplicant and bluez Can't call it
Hi @qinyunliu Please recheck the connections and provide full host and slave logs.
[root@buildroot]:/home/drivers$:insmod esp32_spi.ko
esp32_spi: loading out-of-tree module taints kernel.
Division by zero in kernel.
CPU: 0 PID: 1200 Comm: insmod Tainted: G O 4.4.289 #4
Hardware name: NUC980
Backtrace:
[
sorry,Apart from this log, there is no other information
esp32_spi:spi_dev_init: ESP32 peripheral is registered to SPI bus [0],chip select [0], SPI Clock [0]
your current clock doesn't seem to be in effect. Please follow porting guide, to first get your SPI and GPIOs verified to be working.
@mantriyogesh hi, i used esp32 as the wifi module for Linux, i choice ng spi driver,but ,i get this log for linux, "add_network_iface() failure",can you hele me or give me some advice for this question, Looking forward to your reply。 ![Uploading 微信截图_20240428112009.png…]() root@buildroot:~$insmod esp32_spi.ko esp32_spi: loading out-of-tree module taints kernel. ESP32 peripheral is registered to SPI bus [1],chip select [0], SPI Clock [10] ESP32 init end
*****spi_interrupt_handler** HANDSHAKE_PIN=1 SPI_DATA_READY_PIN=1
Received ESP bootup event EVENT: 3 EVENT: 2 EVENT: 0 EVENT: 1 esp32: process_fw_data ESP chipset's last reset cause: POWERON_RESET esp32: ESP Firmware version: 1.0.3 ESP chipset detected [esp32] *add_network_iface** *esp_cfg80211_add_iface** *****cmd_init_interface** HANDSHAKE_PIN=1 SPI_DATA_READY_PIN=0 esp32: Command[1] timed out esp32: wait_and_decode_cmd_resp(priv, cmd_node) failure, ret: -22 esp32: add_network_iface() failure, ret: -1 network iterface init failed ESP peripheral capabilities: 0xf8 ESP Bluetooth init esp_init_bt: Kernel version does not support HCI over SPI BUS Capabilities: 0xf8. Features supported are:
root@buildroot:~$ifconfig -a
Could you please attach full ESP log and host log from bootup (textual logs)? We could not retrieve the image you attached in https://github.com/espressif/esp-hosted/issues/336#issuecomment-2081308126. Possible to re-attach?
From your current set of logs looks, your SPI pins are configured fine and bootup event is received, but failure reason in ESP log might be the key.
Also could you please first help to assess your transport (Tx and Rx both directions)? For this, you can run raw transport test
It is worthwhile to cross-check your porting against Porting guide for any frequently faced issues.
From your current set of logs looks, your SPI pins are configured fine and bootup event is received, but failure reason in ESP log might be the key.
Also could you please first help to assess your transport (Tx and Rx both directions)? For this, you can run raw transport test
It is worthwhile to cross-check your porting against Porting guide for any frequently faced issues.
Thank you very much for your reply. Through log analysis, it was found that my Linux host did not receive an interrupt, but there was an interrupt generated through the oscilloscope. My Linux host did not enter the interrupt function.
Hello @kangpei1 ,
Anything to be done from our side further? If the driver works for you, please feel free to close this issue.
Hello @kangpei1 ,
Anything to be done from our side further? If the driver works for you, please feel free to close this issue.
thank you for you help,the drivers works
Hello @kangpei1 ,
Anything to be done from our side further? If the driver works for you, please feel free to close this issue. I cant close this issue,Not created by me
Oh! I got confused on this. @qinyunliu , Are you still blocked on this ?
Hello, I'm experiencing the same issue.
I'm trying to use the ESP32C3 as wifi/bt module. I've downloaded the last commit and compiled both kernel driver and ESP's firmware.
I've added a lot of comments to understand what's happening and it seems it is able to receive only bootup events. After it receives only zeroes
I've added the log as file
Hello, below the details
Architecture: armv7l Byte Order: Little Endian CPU(s): 1 On-line CPU(s) list: 0 Thread(s) per core: 1 Core(s) per socket: 1 Socket(s): 1 Vendor ID: ARM Model: 5 Model name: Cortex-A7 Stepping: r0p5 CPU max MHz: 650.0000 CPU min MHz: 650.0000 BogoMIPS: 48.00 Flags: half thumb fastmult vfp edsp thumbee neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm
Linux stm32mp151a-mx 5.10.10 #1 SMP PREEMPT Wed Mar 10 11:42:35 UTC 2021 armv7l armv7l armv7l GNU/Linux
I'm actually trying the versione hosted_ng
@mantriyogesh Which code should I try? Are you suggesting to copy FG code into NG driver?
Regarding, your latest comment, I meant, try (4) first. It is safe to keep (4) in the code, unless you get stable solution. Details of (2): There are some Linux hosts, with which we observe race condition on SPI. Host runs back to back SPI (wrongly), because they observe the Handshake was high from earlier transaction, just due to some timing issue (only happens for some hosts). So, you can try to add selective code to 'disable handshake when CS is asserted (enabled, which means generally set to 0)' from FG to NG. Only spi_slave_api.c register_hs_disable_pin() function to be added in NG and called similar place as that of FG.
Do not even attempt NG module with FG firmware or vice versa, it would not work. Also use latest master of NG at both sides, ESP and host.
I confirm you I'm using NG for both kernel ESP driver and firmware. The repo has been cloned 2 days ago I think it is updated.
I've already tried to comment the spi clock adjusting with no luck
I'm gonna try the point 2.
Not sure if I can share an image, it is a prototype. I'm gonna check and see what I can do
Not sure if I can share an image, it is a prototype. I'm gonna check and see what I can do
In case you are using the jumper cables to evaluate, Just ensure that the cable lengths are minimal <6cm, with good quality and points, and equal lengths.
I've already tried to comment the spi clock adjusting with no luck
for clock adjustments, the module param, clockspeed
is useful.
Irrespective of the module param, comment the function, esp_adjust_spi_clock()
as above.
Also, if you have logic analyser, would really be helpful to understand the case.
I've found the issue using the logical analyzer. I had to add a further line into the device tree to manage correctly the chip select.
Now the wlan0 interface is up, it communicates and I can see the hci0 bluetooth device. Today and next week I'll proceed with a stress test for both connections.
Thank you for your support. For me this issue is solved
I need to use ESP32-C3 or ESP32 as the wifi module for other Linux hosts!