Skip to main content
JBond.1
Senior
December 22, 2020
Question

Read I2C on interrupt with DMA

  • December 22, 2020
  • 1 reply
  • 516 views

Hi, I am trying to read I2C on interrupt (HAL_GPIO_EXTI_Callback) using HAL_I2C_Mem_Read_DMA function. How ever I get into HardFault_Handler. I suspect its because HAL_I2C_Mem_Read_DMA function uses HAL_GetTick() which causes crash?

Is there any way around this?

This topic has been closed for replies.

1 reply

TDK
Super User
December 23, 2020

Include your chip number, there are thousands of different chips.

Find an example in the repository that uses HAL_I2C_Mem_Read_DMA and follow that.

HAL_GetTick is probably not causing the crash.

Within the HardFault_Handler, find out why things are crashing by looking at relevant SCB registers.

"If you feel a post has answered your question, please click ""Accept as Solution""."