2020年11月18日 星期三

[stm32] I2C study

 試著了解一下 I2C DMA.......

最後才知要呼叫 

HAL_StatusTypeDef HAL_I2C_Mem_Read_DMA ( I2C_HandleTypeDef * hi2c,
uint16_t DevAddress,
uint16_t MemAddress,
uint16_t MemAddSize,
uint8_t * pData,
uint16_t Size
)

在實作中,有發現如果是HAL_BUSY 好像I2C就當掉了,無法復原:
STM32: Busy flag is set after I2C initialization

https://electronics.stackexchange.com/questions/272427/stm32-busy-flag-is-set-after-i2c-initialization


不錯的文章:
STM32CubeIDE HAL库操作IIC (一)配置篇
https://blog.csdn.net/u010779035/article/details/104346201

STM32F439xx HAL User Manual
http://www.disca.upv.es/aperles/arm_cortex_m3/llibre/st/STM32F439xx_User_Manual/group__i2c__exported__functions__group2.html#gab25b99552182d2486d8eb441fffdd0a4

STM32 I2C Tutorial – HAL Code Examples Slave & Master – DMA Interrupt
https://deepbluembedded.com/stm32-i2c-tutorial-hal-examples-slave-dma/

沒有留言:

張貼留言