Skip to main content
CLeo.1
Senior II
December 5, 2020
Question

What does Data length and channel length mean both in Master and Slave mode?

  • December 5, 2020
  • 3 replies
  • 1120 views

Hi guys, been working on an I2S project for a while now and I am having such confusion on this bit registers "CHLEN" and "DATLEN".

In Master mode it seems like CHLEN determines the frequency of the SLCK by

2 * CHLEN length * FS and data length I have no idea what it does

and in slave no idea how they both work as the master will provide these signals now.

I had times where it works with CHLEN = 16bit and DATLENGTH = 16bit same with CHLEN = 32BIT And DATALENGTH = 32bit and I have no idea.

Would anyone please explain to me how these registers purpose and how should they set up?

This topic has been closed for replies.

3 replies

waclawek.jan
Super User
December 5, 2020

The RM is not very clear in the details and it may well be that both these fields are simply ignored in Slave mode.

JW

Piranha
Principal III
December 5, 2020

To me RM0433 figure 624 (Waveform examples) seems very clear. And as always - why don't you use the much better SAI peripheral? Is it some collective insanity? =)

CLeo.1
CLeo.1Author
Senior II
December 5, 2020

@Community member​ 

I dont believe these fields are ignored as in slave mode, if I change the datalength from 16 - 32 same with Channel length my audio works, if I leave it at 16 it sounds distorted.

@Piranha​ 

Good suggestion Ill look into it thats for sure, and ill check that RM0433 note