Arm Mbed OS support forum

Problem with LoRaWAN and SPI

Hi, me and my group are currently working on our bachelor involving sending sensor data over lorawan. All has worked well untill we added our last sensor, running on SPI. Does anyone know a problem with using SPI and lorawan together on the NUCLEO-wl55jc1 board? Our error occours when trying to read/write SPI after initializing lorawan and eventqueue.dispatch_forever(). It actually works fine with a printf(sensorvalue) before this line, and crashes after if we do the same thing after this line. The MBED online compiler gives no warning or error. Please say so if you need more information.

Hello, for anyone having the same issue. This error was caused by spi.format, our solution was to set up the format closer to the spi.write function.