Skip to main content
Ken Macfarlane
Associate
April 10, 2019
Question

How to change DMA from 16bit to 8 bit transfers

  • April 10, 2019
  • 1 reply
  • 625 views

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?

This topic has been closed for replies.

1 reply

Ken Macfarlane
Associate
April 10, 2019

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!