cancel
Showing results for 
Search instead for 
Did you mean: 

How to change DMA from 16bit to 8 bit transfers

Ken Macfarlane
Associate

I have inherited a wadge of working SPI DMA code for a product. I want to send bytes rather than 16 bit words. In order to change the length of the SPI packets from 16 clock cycles to 8, I changed the DMA_CCR1_MSIZE & PSIZE fields in DMA1_Channel3->CCR

from 16 bits to 8bits .

Is there more to it than that?

1 REPLY 1
Ken Macfarlane
Associate

The SPI block has to be set to be 8 bits too, via the DFF bit (Data format). Set to 1 for 16 bit, 0 for 8. Doh!