Data Sheet
1031
Atmel | SMART SAM D21 [DATASHEET]
Atmel-42181G–SAM-D21_Datasheet–09/2015
/* ACK or NACK address */
SERCOM - CTRLB.reg |= SERCOM_I2CS_CTRLB_CMD(0x3);
Change to:
// CMD=0x3 clears all interrupts, so to keep the result similar,
// PREC is cleared if it was set.
if (SERCOM - INTFLAG.bit.PREC) SERCOM - INTFLAG.reg =
SERCOM_I2CS_INTFLAG_PREC;
SERCOM - INTFLAG.reg = SERCOM_I2CS_INTFLAG_AMATCH;
6 - The software reset SWRST does not properly propagate inside the I2S
module. As a consequence, the slave mode may not be reconfigured
correctly and may result in unexpected behavior of the SYNCBUSY register.
Errata reference: 12848
Fix/workaround:
None.
7 - PA24 and PA25 cannot be used as input when configured as GPIO with
continuous sampling (cannot be read by PORT). Errata reference: 12005
Fix/Workaround:
- Use PA24 and PA25 for peripherals or only as output pins.
- Or configure PA31 to PA24 for on-demand sampling (CTRL[31:24] all zeroes)
and access the IN register through the APB (not the IOBUS), to allow waiting for
on-demand sampling.
8 - Rx serializer in the RIGHT Data Slot Formatting Adjust mode
(SERCTRL.SLOTADJ clear) does not work when the slot size is not 32 bits.
Errata reference: 13411
Fix/Workaround:
In SERCTRL.SERMODE RX, SERCTRL.SLOTADJ RIGHT must be used with
CLKCTRL.SLOTSIZE 32.
9 - SYSTICK calibration value is wrong. Errata reference: 14154
Fix/Workaround:
right SYSTICK calibration value is 0x40000000.
10 - Depending CPU clock/ I2S clock ratio, the SYNCBUSY.CKEN0 flag
occasionally stuck at 1 when starting a new audio stream with
CTRLA.SWRST=1, then CTRLA.ENABLE=1, then CTRLA.CKEN0=1 Errata
reference: 13408
Fix/Workaround:
Disable the IP by writing 0 to CTRLA.ENABLE before resetting it
(CTRLA.SWRST=1).