cancel
Showing results for 
Search instead for 
Did you mean: 

Error when enabling I2C interrupt in STM32G030F6P6

Viktro
Associate II

STM32G030F6P6 microcontroller CubeIDE environment when enabling interrupt for I2C an LL_I2C_EnableIT_RX (I2C2); error occurs
_______stm32g030xx.h:618:29: error: expected declaration specifiers or '...' before '(' token

Viktro_0-1769885819361.png

error occurs when any I2C interrupt is enabled

 

3 REPLIES 3
TDK
Super User

There are no errors in the code you posted.

If you encounter errors in CubeMX generated code, please include the IOC file used to generate that code.

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

Hello @Viktro 

Please refer to the example below which enable the RX interrupt:

STM32CubeG0/Projects/NUCLEO-G031K8/Examples_LL/I2C/I2C_OneBoard_Communication_IT_Init at master · STMicroelectronics/STM32CubeG0

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.
Saket_Om

thanks for the answers. further analysis of the problem I voiced showed that in an empty project with the same configuration, enabling interrupts does not cause an error. Only when I add the library for working with lsm303dlch. I will look into it further.