Skip to main content
kenny
Associate II
December 17, 2013
Question

I2C DMA and BTF on the STM32F417

  • December 17, 2013
  • 2 replies
  • 658 views
Posted on December 17, 2013 at 04:18

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
    This topic has been closed for replies.

    2 replies

    eleventen
    Associate III
    December 18, 2013
    Posted on December 18, 2013 at 02:12

    Which part?  There is more than one version of the I2C peripheral.

    kenny
    kennyAuthor
    Associate II
    December 19, 2013
    Posted on December 19, 2013 at 04:11

    Hi Marc,

    I amended the title to include the part. I had posted this information in an original post then the website produced some error and I lost it. I've found this site to be very slow and unreliable on many occasions.

    I understand that there are some differences in the peripheral across the parts but is the BTF handled in different ways?

    Kenny