AnsweredAssumed Answered

STM32F0 SPI DMA triggered by Timer compare match

Question asked by Simon Schulz on Apr 6, 2017
Latest reply on Apr 10, 2017 by Simon Schulz

Hi!

 

I have a question regarding the stm32f0 DMA engine. I am using an stm32f0discovery MB1034B evaluation board.

 

I have the following setup:

The SPI dma is configured to transmit 3 bytes from memory to the spi peripheral. Let's say I transfer bytes 0x0A 0x0B 0x0C.

If I trigger the dma transfer via the spi tx dma en flag i cann see my three bytes on the spi bus (0x0a 0x0b 0x0c).

Then the DMA transfer completet isr fires. All fine.

 

Now i want to trigger the dma transfer by a timer1 ch2 compare match (which is as well on dma1 channel 3).

The thing is I can only see single byte transfers. On cc match number one I see 0x0a.

One second later (on the second compare match) I see 0x0b. Another second later I see 0x0c.

Then the DMA transfer completet isr fires.

 

Why does the timer only initiate single transfers? I expected to see the same transfer as when triggering the spi manually?!

 

Any hints?

Outcomes