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

Quick Start

  • Getting Started Guide
  • Product Documentation Summary

Software Development

  • SDK Programming Guide
  • API Documentation
  • Solution Programming Guide
  • FAQ Frequently Asked Questions
    • Questions related to development tools
      • 1 Compilation Related
      • 2 Jlink
      • 3 KEIL
      • 4 Ozone
      • 5 SiFli
      • 6 Trace32
      • 7 SystemView
      • 8 Serial Port
      • 9 Source Insight Related
    • Issues concerning chips
      • 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 issue
      • 1 Common Issues in LCD Debugging
      • 2 Common Issues in Sensor Debugging
      • 3 Common Issues in Flash Debugging
      • 4 Common Issues in Motor Debugging
    • Software Debugging Related Issues
      • 1 Log Debugging
      • 2 Online Debugging Methods
      • 3 Dump Memory to Recover Crash Scene
      • 4 Methods for Saving Crash Dump
  • Application Note
    • SF32LB52X Boot and Low Power Process
    • Low Power Development Guide
    • NandFlash_BBM Parsing Guide
  • Best Practices
    • AI XiaoZhi

Hardware Development

  • Sifli Selection Manual
  • Chip Hardware Design Guide
    • SF32LB52x - Hardware Design Guide
    • SF32LB52X - Hardware Design Guide
    • SF32LB56xU - Hardware Design Guide
    • SF32LB56xV - Hardware Design Guide
    • SF32LB58x - Hardware Design Guide
    • SF32LB55x - Hardware Design Guide
  • Development Boards
    • SF32LB52-DevKit-LCD Development Board User Guide
    • Sich Dev Board LCM Adapter Board Guide
    • SF32LB52-DevKit-ULP Development Board User Guide
    • SF32LB52-DevKit-Nano Development Board User Guide
    • SF32LB56-DevKit-LCD Development Board User Guide
    • SF32LB58-DevKit-LCD Development Board User Guide
  • Module

Software Tools

  • Summary of Software and Hardware Tools
    • Firmware Burning Tool Impeller
    • Graphics Conversion Tool
    • Storage Debugging Tools
      • Flash Chipid and Type Configuration Guide
    • Screen Module Debugging
      • Introduction to Screen Modules
      • Screen Module Framework Introduction
      • Directory Structure Introduction
      • Adding Screen Module (1) – Adding Files (Copying Files)
      • Add Screen Module (2) – Modify the Copied Driver File
      • Add Screen Module (3) – Modify Kconfig/Menuconfig
      • Adding Screen Module Operation Examples
      • FAQ
      • Appendix
        • Screen Driver Callback Functions
        • Application Layer vs. Module Driver Layer Function Correspondence Table
        • List of Supported Screen Modules
    • sftool

Product Introduction

  • About SiFli Technologies

On this page

  • 15.1 MCLK Output Frequency Doubling
OpenSiFli/SiFli-Wiki 0 0
Edit this page
  1. SiFli-Wiki /
  2. FAQ Frequently Asked Questions /
  3. Issues concerning chips /
  4. 15 I2S Related

15 I2S Related¶

15.1 MCLK Output Frequency Doubling¶

  1. Change the SPCLK_DIV division ratio of PLL’s 49.152M from 8 to 4, increasing MCLK 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. Correspondingly, double the duty cycles of bclk and lrck to ensure that after MCLK is doubled, other clock frequencies remain unchanged.
    As shown below, the following values in the CLK_DIV_T structure are all doubled

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   */

Original {48000, 64, 64, 2}, changed to {48000, 128, 128, 4}, other sample rate configurations are modified similarly

#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.