Closed take-42 closed 1 year ago
Hello @take-42 ,
Thank you for using the ESP-Hosted & following porting_guide & checking other issues for possible repetition.
Can you please get the
Hi, @mantriyogesh. Thanks for the reply.
The logs are as follows
When observed with an oscilloscope, the reset pin goes low for a moment when loaded, and it seems that the reset is actually done, but there is no response after that.
Hello @take-42
Thank you for using ESP-Hosted.
Getting bit confused, if you intend to use SDIO or SPI? You are using 0.0.5 with FG solution with 'SDIO only' transport combination as per your firmware log. SDIO firmware cannot work with SPI host driver.
SDIO
SPI
Hello, @mantriyogesh. Thank you for pointing this out. It seems I made an elementary mistake. I changed the following to assume SPI and flashed again to run the test, but the "Response not received" remained.
build and flash SPI firmware $ idf.py menuconfig Example Configuration -> Transport layer -> [X] SPI interface
keep same SPI mode at both the sides SPI_MODE is changed to the same value as the initial (both SPI_MODE_2)
No issues @take-42
Can you please provide the logs at both ends?
esp $ idf.py flash monitor
log and
dmesg or /var/log/messages or /var/log/kern/log at host
By the time, I checked your other logs.
Please disable config for wlan0
and wlan1
, once your get the ethsta0
working from host driver. We recommend to do it such that on boot always it is disabled.
I am not sure if spidev_disabler.dts
changes will be usable by your Linux (it is Raspberry Pi specific). You might have to see the device tree changes. Where SPI bus is enabled and spidev for that bus and chip select is disabled.
Ideally it could be done in following steps:
$ ls /dev/spidev*
should list available SPI devices. Test /dev/spidevX.Y where X is 3 and Y is 0 in your case with Rx & Tx. This will confirm the PSI pins loopback are working fine or not.printk(KERN_ERR "%s:%u\n", func,LINE);
- Verify resetpin (ESP should reset on loading of kernel module) (I think you have done this already?)
Lets get synced till this point, then will move ahead.
Milestones:
any updates please?
Hello, @mantriyogesh Sorry for the delay in replying. I will not be able to work for a few days due to other work, but here is what I can confirm at this time.
All jump wires are 10 cm.
Device tree SPI so if status is okay, /dev/spidev3.0 appears and can be sent/received manually. if status is disabled, it will not appear.
GPIO pins used for DataReady, HandShake, and Reset are enabled, and reset works when the module is loaded (observe low for a moment on the oscilloscope, and the startup log is played)
Hello @take-42 ,
The current logs (Esp and host) will be useful to find out if any obvious misbehavior.
If you are going to take some time, we can close this issue and re-open once you are back.
ESP and dmsesg logs. The following is a list of the logs.
Since the printk statement you gave me would result in an undeclared error, I typed out the function name in solid type as follows
printk( KERN_ERR "spi_data_ready_interupt_handler\n" );
Clubbing some observations:
It clearly states that the SPI first transaction scheduled in spi_sync_transfer() is not executed. This could be mostly due to SPI timing issue
I tried switching SPI_MODE in esp_spi.c and spi_slave_api.c from 0 to 3 (16 patterns in total), but no change was observed.
This is surprising, that none worked, considering that spidev test was success.
Can you please test simple spi slave program from esp-idf first? Flash https://github.com/espressif/esp-idf/tree/master/examples/peripherals/spi_slave receiver to esp chipset and mimic sender in host using some user space program (you might have to reenable spidev for this)
I think once spi (all pins, including miso & mosi) is working fine, esp-hosted would smoothly work.
Did the issue resolve for you?
No, I have not even been able to conduct a test of the spi slave program yet. When the time is right to work on it, I would like to re-open it.
I am currently trying to use the TI SK-AM62 board with the ESP32-WROOM-32E connected via SPI, but it is not responding and I need help.
I have made the following changes to release/fg-v0.0.5.
I have edited the board's dts to enable SPI0 and confirmed that /dev/spidev3.0 appears and I can echo strings from there. At this time, I also enabled GPIO for HandShake, DataReady, and ESP32Reset. Then I changed SPI from dts to disabled as an alternative to spidev_disabler.
Changed HANDSHAKE_PIN and SPI_DATA_READY_PIN in esp_spi.h to the corresponding numbers for this board.
Tried all combinations of SPI_MODE_X set in esp_spi.c and spi_slave_api.c.
Made the following changes to rpi_init.sh Commented out spidev_disabler. Set ARCH and CROSS_COMPILE for make command.
In this state . /rpi_init.sh and use the demo app, you will get the following state.
/dev/esps0, ethap0, and ethsta0 are present.