cancel
Showing results for 
Search instead for 
Did you mean: 

debugger bug: random breakpoint in HAL_I2C_EV_IRQHandler(...)

lynes1
Associate

hello everyone,

i stumbled upon a debugger "bug" using the STM32CubeIDE version 1.13.2 with the stlinkv2 on a stm32g070rb nucleo mcu.
the bug occurs, when using either I2C controller inside the stm32g070 with DMA mode.
After calling "HAL_I2C_Master_Receive_DMA(...)":
-> the mcu sends the correct read command via the i2c to a slave device
-> receives data from the slave device
-> and then the DMA puts the received data into the given Memory location.
but after that the "i2c global interrupt" goes into the "void HAL_I2C_EV_IRQHandler(I2C_HandleTypeDef *hi2c)" function
inside the "stm32g0xx_hal_i2c.c" file.

There my debugger halts everytime, even though there isnt any breakpoint set by me or visible.
If I put the same function inside any other file (e.g. the main), everything works correctly,
meaning the function is still entered (now inside the main file), but wont halt my debugger.

so why does this happen? 


if anyone wants my specific code used, simply follow this tutorial, since i followed the same steps:
https://wiki.st.com/stm32mcu/wiki/Getting_started_with_I2C (chapter 2.4.1, DMA mode)

1 REPLY 1
TDK
Guru

Look at the PC register to see where the cpu is really at. NVIC registers should also reflect the current interrupt, if any. You can also look at the Breakpoints tab to see if any got set without your knowledge.

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