Problems with the SPI initialization on STM32WB55
- June 13, 2020
- 2 replies
- 1263 views
Hi,
I'm having some difficulties implementing an SPI communication on the STM32WB55 example "Peripheral Lite".
I've started from scratch with CubeMX and a i've set up SPI and UART and obtained a working firmware that correctly communicates with an accelerometer, printing values on PC console.
Now I'm trying to migrate my code to the Peripheral Lite example and I don't understand why SPItransmit gets stuck in a loop waiting for TXE flag to be set.
I'm suspecting this is caused by the differences between firmwares' clock configurations.
I am not able to fully understand the initialization code and, by the way Peripheral Lite is written , it doesn't seem possible to use CubeMX generator. Could somebody check my code?
I have uploaded both files:
1)"spi_uart" works fine but it doesn't include BLE functionality
2) "peripheral_mod" is the one derived from the example and it includes code for accelerometer +BLE functionality. It gets stuck at "accInit()".