2026-01-20 2:20 PM
Hi there,
I'm attempting to use an STM32 U5 device to interface with another device over SPI, and am trying to do it using 48 bit SPI frames supported by this device.
An illustration of what I'm trying to accomplish is below, the key is to be able to transmit and receive 48 bits of SPI data, and then cycle the CS (aka NSS) line between frames.
I've successfully accomplished this by putting the SPI driver into 16 bit mode, and using the HAL to send 3 16 bit frames at a time, but this is proving to be pretty slow in terms of how fast the U5 can execute the 10 or so frames required. I do know the content of all the MOSI data at compile time, so I was wondering if there's a good way to use DMA (possibly with the linked list setup) to do this and move some of the load off the CPU, but so far I can't find a solution that allows the transmission of the 10 48-bit frames while also cycling the CS line between frames.
Does anyone have any recommendations?
2026-01-20 2:56 PM - edited 2026-01-20 2:57 PM
Hi,
what is the "48 bit device" ?
What speed you need ?
What speed you get now ? how check - with scope ?
Whats the setting for spi clock ? What speed you see ?
You give no information, except : you want it better...what is it then ?
+
You could use dma to transfer some frames as fast as possible and do the CS by direct write to registers,
what would be the fastest possible way.