Page 1 of 1

ESP-hosted

Posted: 2024-09-30 0:45
by freetoair
Hi,

Since I need a WiFi connection, I've been trying for a week, but without success. I chose ESP-hosted as a WiFi platform because the speed and availability are suitable for me.
I have a problem to set SPI interface in .dts. Namely, I need the SPI to be the master in SPI mode 2 or 3, and to have GPIO on pins 53, 52 and 59. The SPI interface needs normal pins, meaning MISO, MOSI, CLK and CS0.
My question is how do I achieve this in a .dts file?
And one more question: Is SPI sharing possible between two devices with, of course, an additional CS0 pin?

Re: ESP-hosted

Posted: 2024-09-30 1:49
by Crocodile
Hello, your device configuration requirements are directly added in the corresponding DTS file (sdk/config/dts_config).

Code: Select all

&spi0 {
	status = "okay";
};
In the corresponding rv1103-luckfox-pico-ipc.dtsi, all the relevant pins of the spi have been added to the pinctrl

Code: Select all

	pinctrl-0 = <&spi0m0_clk &spi0m0_miso &spi0m0_mosi &spi0m0_cs0>;
If you need to add a new device to share the SPI, you can use the spi0m0_cs1 and change the PINCTRL-0 to

Code: Select all

	pinctrl-0 = <&spi0m0_clk &spi0m0_miso &spi0m0_mosi &spi0m0_cs0 &spi0m0_cs1>;
The other pins are GPIO functions by default if not set, and do not need to be configured

Re: ESP-hosted

Posted: 2024-09-30 11:13
by freetoair
Okay, thanks. I will try that configuration now.

Re: ESP-hosted

Posted: 2024-09-30 13:30
by freetoair
I can now confirm that ESP-hosted has been successfully ported to Luckfox-pico. It works very well !