From 2a37de989aa0a38cce299316202a38791e99156d Mon Sep 17 00:00:00 2001 From: Sandeep Mistry Date: Tue, 19 Jan 2016 11:38:55 -0500 Subject: [PATCH] Correct use of I2C slave address mask, it should be set to 0 for exact match --- cores/arduino/SERCOM.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cores/arduino/SERCOM.cpp b/cores/arduino/SERCOM.cpp index 8c4459ec3..71900689e 100644 --- a/cores/arduino/SERCOM.cpp +++ b/cores/arduino/SERCOM.cpp @@ -409,7 +409,7 @@ void SERCOM::initSlaveWIRE( uint8_t ucAddress ) sercom->I2CS.CTRLA.bit.MODE = I2C_SLAVE_OPERATION ; sercom->I2CS.ADDR.reg = SERCOM_I2CS_ADDR_ADDR( ucAddress & 0x7Ful ) | // 0x7F, select only 7 bits - SERCOM_I2CS_ADDR_ADDRMASK( 0x3FFul ) ; // 0x3FF all bits set + SERCOM_I2CS_ADDR_ADDRMASK( 0x00ul ) ; // 0x00, only match exact address // Set the interrupt register sercom->I2CS.INTENSET.reg = SERCOM_I2CS_INTENSET_PREC | // Stop