2021-07-13 02:00 PM
I see there are sequencing functions, but have found no examples or documentation on how to use them. I need to be able to RX an address, then a pointer, and then either read or write data on a restart, multiple bytes, then a stop.
By sequencing functions, I am referring to: HAL_I2C_Slave_Seq_Receive_DMA() and HAL_I2C_Slave_Seq_Transmit_DMA().
Does anyone have any examples or flowchart for how to use the DMA functions to receive and transmit from a slave's perspective?
Thank you!
Jeff
Solved! Go to Solution.
2021-07-14 04:24 AM
Hello @JTayl.4
You can find the description of these HAL APIs in the user manual. eg: https://www.st.com/resource/en/user_manual/dm00122016-description-of-stm32f3-hal-and-lowlayer-drivers-stmicroelectronics.pdf
You can also refer to the firmware example "I2C_TwoBoards_RestartComIT" under this path :
\STM32Cube\Repository\STM32Cube_FW_F3_V1.11.0\Projects\STM32F303K8-Nucleo\Examples\I2C\I2C_TwoBoards_RestartComIT. This example is using IT mode, but you can make some changes to use it with DMA mode (configuration of DMA)
Hope this would help you!
Regards,
Amira
2021-07-14 04:24 AM
Hello @JTayl.4
You can find the description of these HAL APIs in the user manual. eg: https://www.st.com/resource/en/user_manual/dm00122016-description-of-stm32f3-hal-and-lowlayer-drivers-stmicroelectronics.pdf
You can also refer to the firmware example "I2C_TwoBoards_RestartComIT" under this path :
\STM32Cube\Repository\STM32Cube_FW_F3_V1.11.0\Projects\STM32F303K8-Nucleo\Examples\I2C\I2C_TwoBoards_RestartComIT. This example is using IT mode, but you can make some changes to use it with DMA mode (configuration of DMA)
Hope this would help you!
Regards,
Amira
2021-07-15 10:34 AM
Hi Amira. Thank you. Somehow I missed that example when looking for examples in the STM32CubeIDE. I have my code up and running now. Should have asked sooner. %)