Skip to content

Commit

Permalink
Merge pull request #4370 from jposada202020/i2cperipheral_ctrlc
Browse files Browse the repository at this point in the history
I2CPeripheral samd51 corrections in the CTRLC bit
  • Loading branch information
tannewt authored Mar 9, 2021
2 parents 709cee0 + be90fa8 commit 2c3002b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ports/atmel-samd/common-hal/i2cperipheral/I2CPeripheral.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {}

Expand Down

0 comments on commit 2c3002b

Please sign in to comment.