I am using a KL16 microcontroller for communicating with another device via the I2S interface. The KL16 is configured as a slave and is intended to send audio data to the other device, which will generate both the frame clock and the bit clock.
According to the reference manual, in this scenario the SYNC field of the TCR2 register must be set to 01 (Synchronous with the receiver).
The manual (rev. 3,3) also reports that this field is located at the bits 30 and 31 of TCR2 (see section 39.3.2).
On the other hand, the MKL16Z4.h file reports that this field is located at the bits 26, 27. Also, in this file the fields BCS, BCI and MSEL are not mentioned at all.
Now, by properly setting bits 26 and 27 rather than bits 30 and 31, I was able to successfully initialize and make I2S work. So, it seems that the manual is reporting a wrong piece of information. Therefore, I would like to know:
- the real content of the TCR2 register
- if there is some other register of the same peripheral whose documentation is misaligned with the real content of the register.
Thanks and best regards.