Hello,i try to get a most simple I2C driver to work. So, i setup I2C1 with CubeMX and select code generation.In the resulting main.c, all i have to do is to add something like that: /* USER CODE BEGIN WHILE */
while (1)
{
uint8_t value = 0;
...
CubeMX generates the initialization code for the modules and so it does for I2C. The MX_I2C1_Init() is found in the main.c. But in my case, it was not added by CubeMX to the main function and so the initialization took not place. Adding it by hand do...