2020-12-22 10:14 AM
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?
2020-12-23 02:34 PM
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.