Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
SaGa_4641021
Level 4
Level 4
50 replies posted 100 sign-ins 50 sign-ins

Hi

Is there a way to capture I2S configuration in runtime ?

thanks

SaGa_4641021_0-1635871233312.png

 

0 Likes
1 Solution
RodolfoGL
Employee
Employee
250 solutions authored 250 sign-ins 5 comments on KBA

The alignment, number of channels (always two), channel length and word length are stored some how in the I2S configuration registers. Refer to the PSoC 6 TRM I2S chapter to understand how to access and parse the information. Refer to the I2S_TX_CTL and I2S_RX_CTL registers.

The bit rate is a bit trickier. You would need to know the clock frequency the I2S blocks is sourced, then use the clock divider info from I2S_CLOCK_CTL register to find out the bitrate.

The Frame rate is equal bit rate / 2 / Channel Length 

View solution in original post

1 Reply
RodolfoGL
Employee
Employee
250 solutions authored 250 sign-ins 5 comments on KBA

The alignment, number of channels (always two), channel length and word length are stored some how in the I2S configuration registers. Refer to the PSoC 6 TRM I2S chapter to understand how to access and parse the information. Refer to the I2S_TX_CTL and I2S_RX_CTL registers.

The bit rate is a bit trickier. You would need to know the clock frequency the I2S blocks is sourced, then use the clock divider info from I2S_CLOCK_CTL register to find out the bitrate.

The Frame rate is equal bit rate / 2 / Channel Length