diff --git a/src/drivers/pmw3901/pmw3901.cpp b/src/drivers/pmw3901/pmw3901.cpp index e841afd02a..d717d3ba9c 100644 --- a/src/drivers/pmw3901/pmw3901.cpp +++ b/src/drivers/pmw3901/pmw3901.cpp @@ -342,6 +342,9 @@ PMW3901::init() { int ret = PX4_ERROR; + /* For devices competing with NuttX SPI drivers on a bus (Crazyflie SD Card expansion board) */ + SPI::set_lockmode(LOCK_THREADS); + /* do I2C init (and probe) first */ if (SPI::init() != OK) { goto out;