Demonstrates a bug in the Zephyr SPI implementation on STM32WL. Whether other STM32 platforms are affected is still unknown. The corresponding issue is zephyrproject-rtos/zephyr#50426.
- Connect a LIS12DW12 accelerometer to a NUCLEO-WL55JC STM32WL Nucleo-64 board over the Arduino SPI, using
- Arduino Pin
D8 (GPIO)
for LIS12DW12CS
- Arduino Pin
D11 (MOSI)
for LIS12DW12SDA/SDI/SDO
- Arduino Pin
D12 (MISO)
for LIS12DW12SA0/SDO
- Arduino Pin
D13 (SCK)
for LIS12DW12SCL/SPC
- Compile the project by running
west build -p auto -b nucleo_wl55jc . -- -DSHIELD=lis2dw12
- Flash it using
west flash
orwest flash --runner stm32cubeprogrammer
. - Power-cycle the Nucleo board
After power-on, the NUCLEO LED2 flashes shortly, indicating that the LIS12DW12 initialization took place.
After two seconds, LED2 lights up and stays on; indicating that the application hangs in the sensor-reading-phase.
When attaching the Debugger using west attach
, a backtrace (type bt
) shows the following: