This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] PCM3070RHBEVM-K:申请 PCM3070 支持 — 用于 i2c 配置的编解码器音频评估板和驱动程序

Guru**** 2341440 points
Other Parts Discussed in Thread: PCM3070RHBEVM-K, PCM3070
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/audio-group/audio/f/audio-forum/1520610/pcm3070rhbevm-k-requesting-support-for-pcm3070---codec-audio-evaluation-board-and-driver-for-i2c-configurations

器件型号:PCM3070RHBEVM-K
主题中讨论的其他器件: PCM3070

工具/软件:

尊敬的团队:

目前、我们正在使用 PCM3070RHBEVM-K 音频评估板来生成所需的采样率。  

所需的 PCM3070 配置:

  • 编解码器:主模式
  • 32 位宽度
  • 192,000Hz 采样率
  • 向 DUT 发送音频数据和从 DUT 接收音频数据。
  • 我们使用自己的 i2c 控制器。

请为上述配置提供 192KHz 的驱动程序代码和评估板连接以及 PLL 连接和配置。

此致、

Pavan

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    尊敬的 Pavan:

    该器件没有特定的 Linux 驱动程序、但如果您想使用驱动程序、AIC3154 有一个驱动程序、并且这两种器件的寄存器非常相似 (https://www.ti.com/tool/TLV320AIC32X4SW-LINUX)。 但是、如果您有自己的 I2C 控制器、则不需要驱动程序、因为此编解码器是通过 I2C 控制的。 只需确保为器件提供 MCLK。 如果您能告诉我 MCLK 速率、我可以在特定的 I2C 配置方面提供更多帮助、因为在主模式下需要根据 MCLK 计算时钟。

    此致、
    Mir

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    尊敬的 Mir:

    感谢您的快速答复。

    我们需要按如下方式进行配置:

    编解码器:主模式

    采样率 (WCLK):192KHz

    PCM 数据宽度:32 位

    BCLK: 12.288MHz

    MCLK :  任何事情都是好的。 需要观察 高于 BCLK。

    数据方向:Tx 和 Rx。

     请共享特定寄存器来配置上述数据。

     如果我使用自己的 i2c 控制器、则还有一个针对上述配置的 Tx 和 RX 的 PCM3070RHBEVM-K 电路板连接请求。

    此致

    Pavan

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    尊敬的 Pavan:

    您可以在应用参考指南中找到几个示例脚本: https://www.ti.com/lit/ug/slau332/slau332.pdf

    如果您处于主模式、时钟的配置取决于 MCLK — 在不知道 MCLK 的情况下、您无法以特定频率生成 BCLK 和 WCLK。 但是、您可以先以 24.576MHz 为例、将所需的 BCLK 加倍。 我在示例中为主模式运行和 24.576MHz MCLK 添加了一个位、否则它与应用参考指南中用于高质量 DAC 输出和高质量 ADC 输入的代码相同。

    w 30 00 00 # Initialize to Page 0
    w 30 01 01 # S/W Reset to initialize all registers
    w 30 0b 81# Power up the NDAC divider with value 1
    w 30 0c 84# Power up the MDAC divider with value 4
    w 30 0d 00# Program the OSR of DAC to 128
    w 30 0e 80
    w 30 12 81# Power up NADC divider with value 1
    w 30 13 84# Power up MADC divider with value 4
    w 30 14 80# Program OSR for ADC to 128
    
    w 30 1b 3c #i2s, 32 bits, bclk and wclk are OUTPUT from the device (master mode)
    
    # FOR MASTER MODE: dac_clk as input to bdiv_clkin, then n=2
    w 30 1d 00 
    w 30 1e 82 #BCLK ndiv = 2
    
    
    w 30 3d 01# Select ADC PRB_R1
    w 30 3c 08# Set the DAC Mode to PRB_P8
    
    # Select Page 1
    w 30 00 01
    
    w 30 01 08# Disable Internal Crude AVdd in presence of external AVdd supply or before powering up internal AVdd LDO
    w 30 02 00# Enable Master Analog Power Control
    w 30 7b 01# Set the REF charging time to 40ms
    w 30 0a 00# Set the input common mode to 0.9V
    
    w 30 3d 00# Select ADC PTM_R4
    w 30 47 32# Set MicPGA startup delay to 3.1ms
    w 30 34 80# Route IN1L to LEFT_P with 20K input impedance
    w 30 36 80# Route Common Mode to LEFT_M with impedance of 20K
    w 30 37 80# Route IN1R to RIGHT_P with input impedance of 20K
    w 30 39 80# Route Common Mode to RIGHT_M with impedance of 20K
    w 30 3b 0c# Unmute Left MICPGA, Gain selection of 6dB to make channel gain 0dB
    w 30 3c 0c# Unmute Right MICPGA, Gain selection of 6dB to make channel gain 0dB
    
    w 30 14 25# HP soft stepping settings for optimal pop performance at power up
    w 30 0c 08# Route Left DAC to HPL
    w 30 0d 08# Route Right DAC to HPR
    w 30 03 00# Set the DAC PTM mode to PTM_P3/4
    w 30 04 00
    w 30 10 00# Set the HPL gain to 0dB
    w 30 11 00# Set the HPR gain to 0dB
    w 30 09 30# Power up HPL and HPR drivers
    
    
    # Select Page 0
    w 30 00 00
    # Power up Left and Right ADC Channels
    w 30 51 c0
    # Unmute Left and Right ADC Digital Volume Control.
    w 30 52 00
    # Power up the Left and Right DAC Channels with route the Left Audio digital data to
    # Left Channel DAC and Right Audio digital data to Right Channel DAC
    w 30 3f d6
    # Unmute the DAC digital volume control
    w 30 40 00

    请告诉我它是否有效、以及您是否需要此处的更多帮助。

    此致、
    Mir

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    尊敬的 Mir:

    感谢您的答复。

    使用 USB-miniEVM 软件 (PCM3070 控制软件 — k) UI、我们通过命令行界面刷写了上述代码。 我们使用示波器检查了 MCLK 时钟(两个引脚: J14.1 和 P22.17 ) ,它是 11.28MHz。 我们是否需要更改 电路板上的任何连接 (PCM3070RHBEVM-K)。  我们始终在 MCLK 引脚上观察 11.28MHz 时钟。  

    请提供

     -电路板连接(如 USB MODEVM 上的 SW2 和我们需要连接我们的 DUT I2S 引脚和 DAC 输出和 ADC 输入,如果有任何其他与时钟和电源相关的重要连接)    Tx 和 Rx。

     -为 ADC 和 DAC 请求单独的代码,MCLK –11.2896MHz (PLL 打开 — 因为我们总是观察这个时钟), 32 位宽度,BCLK –12.288MHz 和采样率–192KHz。

    -我们正在尝试“usbmini-EVM UI 通过 i2c 闪存编解码器配置“和我们自己的 i2c 控制器。 请提供两者的电路板连接。

    此致

    Pavan

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    尊敬的 Pavan:

    我曾询问您使用的 MCLK、以便我能够提供一个有效的脚本。 MCLK 由您的 MCU 提供、对于 EVM、则可由 TAS1020 提供、TAS1020 是 EVM 上的一款 USB 音频 ASI 芯片。 如果您能够自行提供 MCLK、则可以更改 SW-2 开关以匹配您的预期时钟。  

    如果您希望在没有外部时钟的情况下运行 EVM、我建议您首先尝试使用 EVM 的 GUI 来初始化器件 — 您可以在 EVM 产品页面或在此处找到该 GUI: https://www.ti.com/tool/download/SLVC367

    应用参考指南中有一些示例脚本需要 12.288MHz 的 MCLK、即 11.2896MHz 下时钟的 48kHz 采样率版本。 这允许禁用 PLL 并分频器提供 128 的 OSR。 如果您必须在 EVM 上使用没有 GUI 的脚本、则应该在为 12.288MHz 编写的参考指南中选择其中一个脚本。 如果 MCLK 为 11.2896、也同样适用。

    此致、
    Mir

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    Hii Mir,


    感谢您的再次光临

    在本例中、我使用 EVM 提供的 MCLK、即 11.896MHz。 它可由 EVM 上的 USB 音频 ASI 芯片 TAS1020 提供。

    我要对 MCLK 进行以下要求、并将其作为 EVM 的 11.2896MHz。

    PCM3070_Codec 作为主模式
    -BCLK=、12.288MHz、
    采样率=192KHz
    -编解码器传输 (ADC) 和编解码器接收 (DAC) 需要单独的代码

    编解码器接收 (RX) 案例:
    -数据来自从站 (DUT)


    在 SW2 中、对于编解码器主模式、我会将 SW2_Pin 1、3 和 5 保持在开启状态、并将 SW2_PIN 2、4、6、7、8 保持在关闭状态。 “怎么样?

    此致、

    Pavan

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    尊敬的 Pavan:

    我花了一两天时间为你写一个脚本。 您将需要 PLL 将输入时钟倍增、使其足够高、能够满足内部时钟要求和 OSR。 我想知道我们可以调整 EVM MCLK 吗? 或者、您是否可以为 12.288MHz 的最终用例提供外部时钟? 11.2896MHz 是 44.1kHz 的倍数、因此 EVM 软件可能具有 44.1kHz 模式和 48kHz 模式。 我们希望 48kHz 模式能够更轻松地计算时钟、因为 192kHz 也是 48kHz 的倍数。 我现在没有 EVM、但明天可以查看。

    此致、
    Mir

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    尊敬的 Pavan:

    您是否能够在计算机上将采样率更改为 48K、从而使电路板上提供的 MCLK 是 12.288MHz? 我们无法使用 11.2896MHz 的 MCLK 生成您需要的 BCLK。 如果您的最终目标将提供 12.288MHz 的 MCLK 或 48kHz 的整数相关倍数、我们可以更好地提供一个脚本。

    此致、
    Mir

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    尊敬的 Mir:
    感谢您的答复。
    我们能够使用 PLL 生成所需的 BCLK (12.288MHz)。 附加代码(将数据从 DUT 发送到编解码器 (DAC))。 我们将对 DAC 使用 32 位和 192KHz 采样率。
    现在我们需要为 ADC 代码生成相同的 BCLK、32 位和 192KHz 采样率(将数据从编解码器发送到 DUT )。 我们将使用相同的时钟设置、但需要您在 ADC 寄存器配置中提供支持。

    此致、

    Pavan

    w 30 00 00 # Initialize to Page 0
    w 30 01 01 # S/W Reset to initialize all registers
    w 30 04 43 # PLL enable
    w 30 05 91 # R & p values
    w 30 06 07 # J value
    w 30 07 18 # D values
    w 30 08 2f # D values
    w 30 0b 87# Power up the NDAC divider with value 7
    w 30 0c 82# Power up the MDAC divider with value 2
    w 30 0d 00# Program the OSR of DAC to 32
    w 30 0e 20# Program the OSR of DAC to 32
    
    w 30 1b 3c #i2s, 32 bits, bclk and wclk are OUTPUT from the device (master mode)
    
    # FOR MASTER MODE: dac_clk as input to bdiv_clkin, then n=2
    w 30 1d 00 
    w 30 1e 81 #BCLK ndiv = 1 to get 12.288MHz
    
    
    w 30 3c 08# Set the DAC Mode to PRB_P8
    
    # Select Page 1
    w 30 00 01
    
    w 30 01 08# Disable Internal Crude AVdd in presence of external AVdd supply or before powering up internal AVdd LDO
    w 30 02 00# Enable Master Analog Power Control
    w 30 7b 01# Set the REF charging time to 40ms
    w 30 0a 00# Set the input common mode to 0.9V
    
    w 30 14 25# HP soft stepping settings for optimal pop performance at power up
    w 30 0c 08# Route Left DAC to HPL
    w 30 0d 08# Route Right DAC to HPR
    w 30 03 00# Set the DAC PTM mode to PTM_P3/4
    w 30 04 00
    w 30 10 00# Set the HPL gain to 0dB
    w 30 11 00# Set the HPR gain to 0dB
    w 30 09 30# Power up HPL and HPR drivers
    
    
    # Select Page 0
    w 30 00 00
    
    # Power up the Left and Right DAC Channels with route the Left Audio digital data to
    # Left Channel DAC and Right Audio digital data to Right Channel DAC
    w 30 3f d6
    # Unmute the DAC digital volume control
    w 30 40 00

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    尊敬的 Pavan:

    Mir 已离职、因此我将提供简要帮助。 我从应用参考指南中得到了这个片段。 由于时钟和上电步骤已经存在、这仅限于 ADC 配置:

    # Select ADC PTM_R4
    w 30 3d 00
    # Set MicPGA startup delay to 3.1ms
    w 30 47 32
    # Set the REF charging time to 40ms
    w 30 7b 01
    # Route IN1L to LEFT_P with 20K input impedance
    w 30 34 80
    # Route Common Mode to LEFT_M with impedance of 20K
    w 30 36 80
    # Route IN1R to RIGHT_P with input impedance of 20K
    w 30 37 80
    # Route Common Mode to RIGHT_M with impedance of 20K
    w 30 39 80
    # Unmute Left MICPGA, Gain selection of 6dB to make channel gain 0dB
    # Register of 6dB with input impedance of 20K => Channel Gain of 0dB
    w 30 3b 0c
    # Unmute Right MICPGA, Gain selection of 6dB to make channel gain 0dB
    # Register of 6dB with input impedance of 20K => Channel Gain of 0dB
    w 30 3c 0c
    # Select Page 0
    w 30 00 00
    # Power up Left and Right ADC Channels
    w 30 51 c0
    # Unmute Left and Right ADC Digital Volume Control.
    w 30 52 00

    此致、
    Jeff McPherson