2018-12-07 01:38 PM
I'm using STM32CubeMX (5.0.0) and Atollic TrueSTUDIO (9.2.0) to implement I2C slave functionality on an STM32F3 series microcontroller. I am able to get the DMA to work accepting bytes from an I2C write command, but can't seem to get the DMA to provide the data for an I2C read command.
I don't see any examples where DMA is used by the slave to provide transmit data. Is this possible, or is the I2C TX DMA only for master mode?
Thanks.
Solved! Go to Solution.
2018-12-26 06:10 AM
Hello,
There are several I2C examples in the STM32CubeF3 package. DMA can be used either for data transmission or reception thanks to the 2 APIs:
Both of them are already used in the example STM32Cube_FW_F3_V1.10.0\Projects\STM32303C_EVAL\Examples\I2C\I2C_TwoBoards_ComDMA.
A description of the example is provided in the readme.txt file.
There is no TrueSTUDIO dedicated example in the package, but it is easy (almost automatically done) to migrate the SW4STM32 project to TrueSTUDIO.
-Amel
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2018-12-26 06:10 AM
Hello,
There are several I2C examples in the STM32CubeF3 package. DMA can be used either for data transmission or reception thanks to the 2 APIs:
Both of them are already used in the example STM32Cube_FW_F3_V1.10.0\Projects\STM32303C_EVAL\Examples\I2C\I2C_TwoBoards_ComDMA.
A description of the example is provided in the readme.txt file.
There is no TrueSTUDIO dedicated example in the package, but it is easy (almost automatically done) to migrate the SW4STM32 project to TrueSTUDIO.
-Amel
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2019-01-02 08:18 AM
Hi Amel,
Thanks very much for your answer. I had neglected to mention that I would prefer to use only the low level interface, but the high level examples at least indicate that it is possible, and should provide sufficient info.
Happy New Year!
Bruce.