Skip to main content
Explorer
October 12, 2024
Solved

Clock Configuration Issue for Sound Acquisition with STM32G473VET6 and IMP34DT05TR

  • October 12, 2024
  • 5 replies
  • 2964 views

Hello,

I am currently working on a sound acquisition project using the STM32G473VET6 microcontroller and IMP34DT05TR microphone. I am encountering an issue while trying to configure the Serial Audio Interface (SAI) clock frequency. My target frequency is 2.048 MHz, but CubeMX is not allowing me to set this value. Currently, the clock frequency is set at 12 MHz.

I would appreciate any guidance on how to configure the SAI clock to 2.048 MHz or any potential workarounds to achieve this configuration.

Best,

AiROT

    This topic has been closed for replies.
    Best answer by waclawek.jan

    Use the MCKDIV divider in SAI.

    JW

     

    5 replies

    Super User
    October 12, 2024

    > My target frequency is 2.048 MHz, but CubeMX is not allowing me to set this value

    Show.

    JW

    AiROTAuthor
    Explorer
    October 13, 2024

    Here's the screenshots for the same!

    Clock Frequency (1).jpegClock Frequency (2).jpeg

    Super User
    October 13, 2024

    SAI uses integer divider. You can't divide 24MHz to 2.048MHz. 2MHz should be viable though.

    JW

    AiROTAuthor
    Explorer
    October 13, 2024

    We are getting error "PLLQ output frequency is currently set to 2Mhz, must be >= 8Mhz and =<150Mhz." Please see the screenshot.

    How do we modify this limit?

    Error (2).jpegError (1).jpeg

    Super User
    October 13, 2024

    Use the MCKDIV divider in SAI.

    JW

     

    AiROTAuthor
    Explorer
    October 13, 2024

    Will try and update you!

    AiROTAuthor
    Explorer
    October 19, 2024

    @waclawek.jan thanks, it worked!