jernejp21 / klipper

Klipper is a 3d-printer firmware
GNU General Public License v3.0
0 stars 0 forks source link

I2C sw reset on STM32MP157 #3

Open jernejp21 opened 2 years ago

jernejp21 commented 2 years ago

STM32MP157 doesn't have SWRST bit in I2C_CR1 register. Instead, you have to use PE bit to reset I2C.

jernejp21 commented 2 years ago

From the manual:

PE must be kept low during at least three APB clock cycles in order to perform the software reset. This is ensured by writing the following software sequence:

  1. Write PE = 0
  2. Check PE = 0
  3. Write PE = 1