Skip to content

Commit 2a37de9

Browse files
committed
Correct use of I2C slave address mask, it should be set to 0 for exact match
1 parent 2a6d856 commit 2a37de9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cores/arduino/SERCOM.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ void SERCOM::initSlaveWIRE( uint8_t ucAddress )
409409
sercom->I2CS.CTRLA.bit.MODE = I2C_SLAVE_OPERATION ;
410410

411411
sercom->I2CS.ADDR.reg = SERCOM_I2CS_ADDR_ADDR( ucAddress & 0x7Ful ) | // 0x7F, select only 7 bits
412-
SERCOM_I2CS_ADDR_ADDRMASK( 0x3FFul ) ; // 0x3FF all bits set
412+
SERCOM_I2CS_ADDR_ADDRMASK( 0x00ul ) ; // 0x00, only match exact address
413413

414414
// Set the interrupt register
415415
sercom->I2CS.INTENSET.reg = SERCOM_I2CS_INTENSET_PREC | // Stop

0 commit comments

Comments
 (0)