Hi everyone,
I’m new with RIOT and having a hard time with trying to make the test/drivers/sx126x code example work. I have my LoRa-e5-mini (STM32WLE5JC) connected with my PC using an ST-Link, and I successfully flashed hello-world example. But with sx126x, I’m stuck at “[sx126x] init: SPI_0 initialized with success”.
I set DEBUG set to 1 in sx126x.c and found code seems to be stuck inside sx126x_set_reg_mode(). Does anyone have a clue on what is going on ?
This flash and term logs :
### Flashing Target ###
Open On-Chip Debugger 0.11.0
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
hla_swd
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
trst_only separate trst_push_pull
Info : clock speed 500 kHz
Info : STLINK V2J45S7 (API v2) VID:PID 0483:3748
Info : Target voltage: 3.292948
Error: BUG: can't assert SRST
Info : stm32wlx.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : starting gdb server for stm32wlx.cpu on 0
Info : Listening on port 37125 for gdb connections
TargetName Type Endian TapName State
-- ------------------ ---------- ------ ------------------ ------------
0* stm32wlx.cpu hla_target little stm32wlx.cpu running
Info : Unable to match requested speed 500 kHz, using 480 kHz
Info : Unable to match requested speed 500 kHz, using 480 kHz
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x08001020 msp: 0x20000200
Info : device idcode = 0x10016497 (STM32WLEx - Rev 'unknown' : 0x1001)
Info : flash size = 256kbytes
Info : flash mode : single-bank
Warn : Adding extra erase range, 0x08006f28 .. 0x08006fff
auto erase enabled
wrote 28456 bytes from file /home/marty/Bureau/RIOT/tests/drivers/sx126x/bin/lora-e5-dev/tests_sx126x.elf in 1.633891s (17.008 KiB/s)
verified 28456 bytes in 1.076891s (25.805 KiB/s)
Info : Unable to match requested speed 500 kHz, using 480 kHz
Info : Unable to match requested speed 500 kHz, using 480 kHz
shutdown command invoked
Done flashing
root@marty-VirtualBox:/home/marty/Bureau/RIOT/tests/drivers/sx126x# BOARD=lora-e5-dev LORA_DRIVER=sx126x_stm32wl make term
/home/marty/Bureau/RIOT/dist/tools/pyterm/pyterm -p "/dev/ttyUSB0" -b "115200" -ln "/tmp/pyterm-root" -rn "2025-02-28_12.49.20-tests_sx126x-lora-e5-dev"
Twisted not available, please install it if you want to use pyterm's JSON capabilities
2025-02-28 12:49:20,989 # Connect to serial port /dev/ttyUSB0
Welcome to pyterm!
Type '/exit' to exit.
2025-02-28 12:49:25,700 # main(): This is RIOT! (Version: 2025.04-devel-164-gcdcab)
2025-02-28 12:49:25,707 # [sx126x] init: SPI_0 initialized with success
And nothing happens after that.
Thanks