Just working on a STM32U5 project and I'm running into issues with its SPI peripheral. Bumping this thread as it may increase the odds of having people who have actually worked on that specifically.
Not using HAL at all - so also baremetal here. I want to do blocking, full-duplex transfers, and that's where things, which were pretty simple with other STM32 series, get hairy. The SPI peripheral in the STM32U5 is an absolute nightmare. They probably meant to make it pretty smart, but it's horrific to use and the documentation is, uh, not great. There's basically a TX/RX FIFO behavior that looks almost untractable, especially for the RX FIFO.
There is the "RX FIFO packing Level" and the "FIFO Threshold", both interacting in insane ways. The bottom line is that it's impossible to know exactly how many bytes of data are ready to read in the RX FIFO unless you do a dance with several flags. When looking at the way they have implemented blocking full-duplex transfers in the HAL, it looks absolutely obnoxious.
The bottom line is it's hard to write a blocking function that will for certain read all received bytes.
It looks like it's much easier when using DMA transfers, as with DMA, all quirks of the SPI FIFOs are dealt with automatically. But using DMA (2 channels) for transmitting a few tens of bytes in a blocking way looks like using a bazooka for killing a fly. So if anyone has any experience with using SPI on this STM32U5 series, I'll be curious to hear about that.