2018-11-08 09:17 AM
Hello,
When we use the APB1 clock 2MHz for peripherals I don't see any problem with communications between memory and MCU. However I would like to increase the APB1 clock to around 16MHz for my final application do the the fact that other devices needed it. However when I increase the APB1 clock rate to i.e 4MHz I already see data line corrupted on I2C bus.
I am using 10k pull-up resistors to drive on SDA and SCL lines.
I would like to ask you if you have faced with the similar problem and if yes do you have any suggestion to resolve it?
Thank you in advance
Jacek Pieczaba
Solved! Go to Solution.
2018-11-09 05:40 AM
Hi,
To complement Rene's comment:
Regards.
2018-11-09 02:56 AM
Hi Jacek,
The I²C in the MCU is working in standard mode and fast mode. If you have programmed it for standard mode, I thing that your 10k pull-up resistors are good values.
If you are using the Cube environment for your firmware normally you should not have to do something, it is managed by the HAL driver. Just setting the I²C speed is needed.
In case you don't use Cube, take care to have updated the I2C_CR2 register (more specifically the FREQ bit-field according to your new Peripheral Clock frequency). You can refer to the reference manual "https://www.st.com/content/ccc/resource/technical/document/reference_manual/59/b9/ba/7f/11/af/43/d5/CD00171190.pdf/files/CD00171190.pdf/jcr:content/translations/en.CD00171190.pdf" section 26.3.3 and 26.6 (for register mapping).
Regards.
2018-11-09 05:40 AM
Hi,
To complement Rene's comment:
Regards.
2018-11-09 05:46 AM
Good morning,
Thank you very much for fast suggestions. I will test it right away today.. I will keep you posted about progress...
Thank you again
Jacek
2018-11-09 09:10 PM
Hello,
I have tried the High Speed Configuration and it looks that is works exactly how I wanted. Thank you again for suggestions.
With Best Regards,
Jacek Pieczaba