cancel
Showing results for 
Search instead for 
Did you mean: 

CubeMX2: I2S Sample rate calculation does not match value computed in hardware by HAL

ebrombaugh1
Associate III

In CubeMX2 when configuring the I2S peripheral on an STM32C542 running from a clock of 144MHz and selecting an audio clock rate of 96000Hz, CubeMX2 computes a nearest reachable frequency of 97826Hz (I2SDIV = 23, ODD = 0). When code is generated and run on actual hardware, the HAL2 I2S driver computes a different value of 95744Hz (I2SDIV = 23, ODD = 1). The HAL2 hardware value has less error from the desired 96000Hz than the value reported by CubeMX2, but the CubeMX2 value may be used in designing other aspects of the firmware and result in unexpected performance.

 

ebrombaugh1_0-1776231757798.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
STackPointer64
ST Employee

Hello @ebrombaugh1,

I have escalated the issue to the relevant team for resolution. It is being tracked internally under ticket number CDM0061754.

Best regards,

To improve visibility of answered topics, please click 'Accept as Solution' on the reply that resolved your issue or answered your question.

View solution in original post

1 REPLY 1
STackPointer64
ST Employee

Hello @ebrombaugh1,

I have escalated the issue to the relevant team for resolution. It is being tracked internally under ticket number CDM0061754.

Best regards,

To improve visibility of answered topics, please click 'Accept as Solution' on the reply that resolved your issue or answered your question.