cancel
Showing results for 
Search instead for 
Did you mean: 

Is there any known issue with I²C and external interrupts (buttons)?.

PParo.1
Associate

I'm using an STM32F103CB device, with a OLED screen in I2C1 (PB7 and PB6). The MCU freezes (hard fault) when an IRQ come from an edge in PB5, PB4 or PB3.

I suspect that theres is a problem with the IRQ enabling function, which includes the I²C pins in the macro:

HAL_NVIC_EnableIRQ(EXTI9_5_IRQn);

Is there any way to enable only the IRQ in PB5? The screen works fine until an interrupt in PB3, PB4 or PB5 ocurrs and the MCU enters in hard fault. If I use another I2C port, theres no problem at all...

Thank you.

0 REPLIES 0