SiFli Solution is now fully open: a production-ready solution set that accelerates projects from prototype to mass production. Solution Documentation.

SiFli-Wiki SiFli-Wiki SiFli-Wiki
  • User Guide
  • Examples
  • API Documentation
  • About Us
/
  • English
  • 中文

Quick Start

  • Getting Started
  • Product Documentation Summary

Software Development

  • SDK Programming Guide
  • API Documentation
  • Solution Programming Guide
  • FAQ Frequently Asked Questions
    • Development Tool-Related Issues
      • 1 Compilation-Related
      • 2 Jlink
      • 3 KEIL
      • 4 Ozone
      • 5 SiFli
      • 6 Trace32
      • 7 SystemView
      • 8 UART
      • 9 Source Insight-related
    • Chip-Related Issues
      • 1 GPIO-related
      • 2 Timer-Related
      • 3 Interrupt-related
      • 4 Watchdog-Related
      • 5 RTC Related
      • 6 ADC Related
      • 7 I2C-related
      • 8 Low Power-Related
      • 9 PWM
      • 10 System
      • 11 Bluetooth
      • 12 USB-Related
      • 13 UART-Related
      • 14 Dual-core Related
      • 15 I2S-related
      • 13 SPI Related Issues
    • Peripheral Driver Debugging Issues
      • 1 Common LCD Debugging Issues
      • 2 Common Sensor Debugging Issues
      • 3 Common Flash Debugging Issues
      • 4 Common Motor Debugging Issues
    • Software Debugging-Related Issues
      • 1 Log Debugging
      • 2 Online Debugging Method
      • 3 Restoring the Crash Context from a Memory Dump
      • 4 Methods for Saving the Crash Context
  • Application Notes
    • Low-Power Development Guide
    • Application Startup Flow
    • NandFlash_BBM Analysis Guide
    • SF32LB52-DevKit-Core-3p3 Development Board Test Guide
  • Best Practices
    • AI Xiaozhi

Hardware Development

  • SiFli Selection Guide
    • SiFli Chip Model Guide
    • Module Model Guide
  • Chip Hardware Design Guide
    • SF32LB52x Hardware Design Guide
    • SF32LB52X Hardware Design Guide
    • SF32LB56xU Hardware Design Guide
    • SF32LB56xV Hardware Design Guide
    • SF32LB58x Hardware Design Guide
    • SF32 Series UART Automatic Flashing Design
    • SF32LB55x Hardware Design Guide
    • SF32LB52-MOD-1 Module EPD Display Design Guide
  • Development board
    • Development Board Model Guide
    • SF32LB52-DevKit-LCD Development Board User Guide
    • Guide to Making an LCM Adapter Board for SiFli Development Boards
    • Lichuang Huangshan Pi Development Board User Guide
    • SF32LB52-DevKit-Nano Development Board User Guide
    • SF32LB52-DevKit-Core-3p3 Development Board User Guide
    • SF32LB52-OED-6’-EPD Development Board User Guide
    • SF32LB56-DevKit-LCD Development Board User Guide
    • SF32LB58-DevKit-LCD Development Board User Guide
  • Module

Software Tools

  • Software and Hardware Tool Summary
    • Firmware flashing tool Impeller
    • Graphics Conversion Tool
    • Storage debugging tools
      • Flash Chipid and Type Configuration Guide
    • Screen module debugging
      • Screen module introduction
      • Display module framework introduction
      • Directory structure introduction
        • External
        • Built-in
      • Add display module (1) – Add files (copy files)
      • Add display module (2) – Modify the copied driver files
        • Modify the screen driver
        • Modify the screen TP driver
        • Modify the screen backlight driver
      • Add display module (3) – Modify Kconfig/Menuconfig
      • Example operations for adding a display module
        • SF32LB52x-DevKit-LCD example: adding an SPI-LCD (external)
        • Example: adding a QSPI-LCD on 525 (built-in)
        • Example: adding a DPI-LCD on 566 (built-in)
      • FAQ
      • Appendix
        • Display driver callback functions
        • Mapping table between application-layer functions and module driver-layer functions
        • List of adapted display modules
      • LCD frame-rate calculator
    • sftool

Product Introduction

  • About SiFli

On this page

  • 15.1 MCLK output frequency doubles
SiFli-Wiki 0 0
Edit this page
  1. SiFli-Wiki /
  2. FAQ Frequently Asked Questions /
  3. Chip-Related Issues /
  4. 15 I2S-related
View as Markdown Open in ChatGPT Open in Claude

15 I2S-related¶

15.1 MCLK output frequency doubles¶

  1. The PLL 49.152M divider ratio SPCLK_DIV changes from 8 to 4, and MCLK increases from 6.144M to 12.288M.

#ifdef DOUBLE_MCLK    
    __HAL_I2S_SET_SPCLK_DIV(hi2s, 4);   // set to 12.288M to i2s (49.152M/4=12.288M)  PLL 
#else
    __HAL_I2S_SET_SPCLK_DIV(hi2s, 8);   // set to 6.144M to i2s   PLL
#endif
  1. Double the corresponding bclk duty and lrck duty as well, so that after MCLK is doubled, the other clock frequencies remain unchanged. As follows, double the following values of CLK_DIV_T in the corresponding structure:

uint16_t  lr_clk_duty_high;   /*!<  LRCK duty cycle high   */
uint16_t  lr_clk_duty_low;    /*!<  RX LRCK duty cycle low   */
uint16_t  blck_duty;          /*!<  bit clock duty cycle   */

Change the original {48000, 64, 64, 2} to {48000, 128, 128, 4}. Other sampling rate configurations are modified in the same way.

#ifdef DOUBLE_MCLK
static CLK_DIV_T  txrx_clk_div[9]  = {{48000, 128, 128,  4}, {44100, 128, 128,  4}, {32000, 192, 192,  6}, {24000, 256, 256, 8}, {22050, 256, 256,  8},
    {16000, 384, 384, 12}, {12000, 512, 512, 16}, {11025, 512, 512, 16}, { 8000, 768, 768, 24}
};
#else
static CLK_DIV_T  txrx_clk_div[9]  = {{48000, 64, 64,  2}, {44100, 64, 64,  2}, {32000, 96, 96,  3}, {24000, 128, 128, 4}, {22050, 128, 128,  4},
    {16000, 192, 192, 6}, {12000, 256, 256, 8}, {11025, 256, 256, 8}, { 8000, 384, 384, 12}
};
Previous
14 Dual-core Related
Next
13 SPI Related Issues

2025, SiFli

Made with Sphinx and Shibuya theme.