This is the little application test that uses the I2C1 on the extension Primer connector.
We implemented the "M24C08_EEPROM" example from the ST Library as a CircleOS application.
It shows how to use peripheral which pins are shared with FSMC.
The I2C1 on the extension card does not run because of sharing PB7 (I2C1_SDA) with the FSMC (FSMC_NADV) used for the LCD management.
So, the only solution is to temporarily unvalidate the FSMC before calling I2C functions.
This can be done by this function, followed by a delay :
for(i=0; i<1000; i++);
and the LCD will run again.
This fixes the START generation, but sometimes the program still stalls. So, we also must disable temporarily the TIM2 interrrupts (MEMS), with the instruction :
TIM_Cmd( TIM2, DISABLE );
1.1 Compiled with new ST library version 3.x and CircleOS version 4.x
1.0 First release