cancel
Showing results for 
Search instead for 
Did you mean: 

SPI full duplex mode 3 using DMA.

papageno
Associate III

Hi guys,

Probably the question has been asked one million times but being new on this site, i did not find any clue. My problem is using STM32F446 on SPI1 with DMA2 addressing a device (ADIS16488) in 16bits SPI in mode 3. Polling works perfectly but seems a little time consuming for me. I tried the IT and DMA but I am facing a problem I cannot solve. When I want to perform a transfer in burst , let s say a 12x6bits array, in IT and DMA only a transfer only one halfword it succeeds, if more that one halfword, the second data on MISO is 0x0000. I think that my slave can not take the burst mode (stall time between data is 2µs min) and the second 16bits command is lost so I was wondering if there is a way to insert a little pause in the sck signal between two consecutive halfwords transfers in order to respect those 2µs.

I thank you for your help

olie

1 ACCEPTED SOLUTION

Accepted Solutions

Run TIM1 or TIM8 with a period of the 16-bit frame plus the delay. Use that timer to trigger DMA feeding the SPI Tx. Leave SPI Rx as it is now.

JW

View solution in original post

2 REPLIES 2

Run TIM1 or TIM8 with a period of the 16-bit frame plus the delay. Use that timer to trigger DMA feeding the SPI Tx. Leave SPI Rx as it is now.

JW

papageno
Associate III

Thanks Jan,

That's an interesting idea.

Olie