AnsweredAssumed Answered

I2C DMA and BTF on the STM32F417

Question asked by Kenny on Dec 17, 2013
Latest reply on Dec 19, 2013 by Kenny
Hi,

Using the peripheral as a master transmitter I would like to use a repeated start to talk to 2-4 devices before closing communications.

My code handles interrupts for the start bit and slave address. The DMA dutifully transmits the number of bytes I request. In the DMA completion interrupt I disable DMA and the stream per the documentation and wait for the BTF interrupt.

In the BTF event handler I'd like to configure another DMA and request the repeated start but the problem is that the interrupt is called again with the BTF flag set.

I put in some code to only perform my repeated start once and the scope shows my test sequence working. Just not happy about the interrupt getting called 12 times or so before things get going again.

BTF is cleared by reading SR1. What causes it to assert again? 

Thanks,

Kenny

Outcomes