Hi guys, I’m trying to use a Wio-SX1262 module with a XIAO nRF54L15 and Zephyr, but it just doesn’t work. I tested with an Arduino example, and it works (Some guy did a port to Arduino but looks like something’s doesn’t work, like the NVS storage didn’t was implemented because I can’t Join correctly, but I can see that the intent on my Gateway)
For all I say before I know is not a wiring problem, it’s something with Zephyr.
My app.overlay is this
/ {
/*
* @brief Device Tree Overlay for XIAO nRF54L15
*
* This file customizes the base board device tree to configure
* peripherals for a specific application, including:
* - SX1262 via SPI
*/
//Aliases for easy access to devices in application code
aliases {
lora0 = &lora0;
spi0 = &xiao_spi;
};
};
// SPI peripheral
&xiao_spi {
compatible = "nordic,nrf-spim";
status = "okay";
// D0 pin for Chip Select
cs-gpios = <&xiao_d 0 GPIO_ACTIVE_LOW>;
//Lora module
lora0: sx1262@0 {
compatible = "semtech,sx1262";
reg = <0>;
label = "SX1262";
spi-max-frequency = <8000000>;
reset-gpios = <&xiao_d 2 GPIO_ACTIVE_LOW>;
//antenna-enable-gpios = <&xiao_d 4 GPIO_ACTIVE_LOW>;
busy-gpios = <&xiao_d 3 GPIO_ACTIVE_HIGH>;
dio1-gpios = <&xiao_d 1 GPIO_ACTIVE_HIGH>;
//rx-enable-gpios = <&xiao_d 4 GPIO_ACTIVE_HIGH>;
};
};
SO I wouldn’t be so Quick with that…
Your overlay is not obviously wrong, but it is probably incomplete for the SX1262. The most likely problem is not Zephyr in general — it is that the SX1262 driver needs the board control lines defined exactly right, especially DIO1, BUSY, RESET, and often RF-switch control (tx-enable-gpios, rx-enable-gpios, or dio2-tx-enable). Zephyr supports all of those, but your current overlay only defines part of the radio interface.
Try this and the other tweaks see if you don’t get it or closer…
/ {
aliases {
lora0 = &lora0;
};
};
&xiao_spi {
status = "okay";
cs-gpios = <&xiao_d 0 GPIO_ACTIVE_LOW>;
lora0: sx1262@0 {
compatible = "semtech,sx1262";
reg = <0>;
spi-max-frequency = <1000000>;
reset-gpios = <&xiao_d 2 GPIO_ACTIVE_LOW>;
busy-gpios = <&xiao_d 3 GPIO_ACTIVE_HIGH>;
dio1-gpios = <&xiao_d 1 GPIO_ACTIVE_HIGH>;
/* Use these only if the board really has separate RF switch control */
/* tx-enable-gpios = <&xiao_d 4 GPIO_ACTIVE_HIGH>; */
/* rx-enable-gpios = <&xiao_d 5 GPIO_ACTIVE_HIGH>; */
/* Or, if the module uses DIO2 to control RF switching: */
/* dio2-tx-enable; */
status = "okay";
};
};
I do not think You have enough evidence to say “Zephyr is broken.”
I think it is more likely one of these:
wrong GPIO mapping
missing RF switch control
wrong GPIO polarity
SPI bus/pinctrl not actually resolving how he thinks on the nRF54L15 board
That is the old story with radios: Arduino can limp through a partial setup; Zephyr usually makes you get the hardware description right.
Try this,
Open build/zephyr/zephyr.dts and confirm &xiao_spi and &xiao_d resolve the way you think.
Lower SPI first to 1000000 or even 500000 until the radio is proven alive.
Has there been an update? I am having an issue with the nrf52840 and the Wio-SX1262. The lora module initializes fine but does not tx or rx anything. What are the correct dts configs to use?