Merge pull request #4370 from jposada202020/i2cperipheral_ctrlc

I2CPeripheral samd51 corrections in the CTRLC bit
This commit is contained in:
Scott Shawcroft 2021-03-09 12:58:59 -08:00 committed by GitHub
commit 2c3002b327
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -58,6 +58,10 @@ void common_hal_i2cperipheral_i2c_peripheral_construct(i2cperipheral_i2c_periphe
samd_peripherals_sercom_clock_init(sercom, sercom_index);
#ifdef SAM_D5X_E5X
sercom->I2CS.CTRLC.bit.SDASETUP = 0x08;
#endif
sercom->I2CS.CTRLA.bit.SWRST = 1;
while (sercom->I2CS.CTRLA.bit.SWRST || sercom->I2CS.SYNCBUSY.bit.SWRST) {}