音频ADC(ES7243)的调试总结


前言

ES7243是一颗2路ADC(MIC)音频模数转换IC,一款高性能立体声音频模数转换器。最高支持24bit 200kHz采样率,可应用于麦克风阵列,音响,数字电视,音频接口,音频接收器等场合。项目需要实现2路MIC信号采集输入到FPGA系统进行处理,本文对调试的过程以及遇到的问题做一个记录。


一、芯片配置

ES7243在软件模式下工作,通过I2C端口与主机设备通信。芯片内部框架图如下:
在这里插入图片描述

1. 接口时序

在这里插入图片描述
在这里插入图片描述

在这里插入图片描述
I2C的接口时序驱动程序可参考上一篇文章:基于Verilog的IIC接口通信设计(支持多字节地址读写)

2. 寄存器配置

需要配置的寄存器数量不是很多,只有十几组左右,而且不需要全都配置。寄存器配置值详情请翻看原厂官方提供的数据手册:ES7243系列的数据手册
在这里插入图片描述

主模式下,原文提供的参考寄存器配置如下:
在这里插入图片描述


二、音频数据格式

I2S全称Inter-IC Sound, Integrated Interchip Sound,或简写IIS,是飞利浦在1986年定义(1996年修订)的数字音频传输标准,用于数字音频数据在系统内部器件之间传输,例如编解码器CODEC、DSP、数字输入/输出接口、ADC、DAC和数字滤波器等。除了都是由飞利浦定义外,I2S和I2C没有任何关系。
I2S是比较简单的数字接口协议,没有地址或设备选择机制。在I2S总线上,只能同时存在一个主设备和发送设备。主设备可以是发送设备,也可以是接收设备,或是协调发送设备和接收设备的其它控制设备。在I2S系统中,提供时钟(SCK和WS)的设备为主设备。

在这里插入图片描述
SCK:时钟信号
WS:左右声道选择信号(0:左声道,1:右声道)
SD:数据信号

I2S 音频标准有三种,分别是:①I2S Philips 标准;②MSB 对齐标准;③LSB 对齐标准;④PCM 标准。具体时序协议标准参考文章:I2S通信协议

1. I2S数据格式

本工程采用I2S 音频标准——I2S Philips 标准波形,24bit数据帧有效。数据协议格式如下:
在这里插入图片描述

2. 数据采集

下图是主机模式下内部时钟树图,需要注意的是,ES7243在从机模式下自动检测LRCK比率。
在这里插入图片描述
在本工程中,设置MCLK = 12.288MHz,采样频率LRCK = 16KHz, SCLK和LRCK保持下降沿对齐。

下表是常见音频应用场景的采样频率范围:
在这里插入图片描述


三、调试过程总结

1. IIC通信是否正常

在这部分调试中,最容易出问题的就是IIC设备地址出问题,这个器件和其他器件在设备地址这一块是有区别的,因为他的State of AD[1:0] pins和Chip Address是反着的。

State of AD[1:0] pinsChip Address
000x13(7bit) / 0x26 (8bit)
010x12(7bit) / 0x24 (8bit)
100x11(7bit) / 0x22 (8bit)
110x10(7bit) / 0x20 (8bit)

2. I2S数据帧是否正确

正确配置完成后,会出现正常的时钟和数据关系。前面配置的采样率是16Khz,那么LRCK输出的时钟频率要为为16Khz。下图为调试过程中抓取的SCLK和数据dout[31:0]之间的波形图。
在这里插入图片描述

3. BCLK和LRCK下降沿对齐

正确的波形如下:(两个时钟的下降沿可以正确对齐)
(上述图片供参考,来源网络)

4. 调试总结

在调试的过程中,要一步步的排查问题。首先看配置是否正确,看数据配置是否成功,可以通过I2C接口读取寄存器数据来判断。其次通过示波器抓取BCLK和LRCK时钟,看下降沿是否对齐。然后再看有声音时,数据信号是否会随着声音强度和频率变化而产生变化,如果有变化,说明调试成功。

### Beckhoff PLC Compared to Other PLCs Features and Advantages #### Flexibility in System Design Beckhoff PLC systems offer a high degree of flexibility through the use of PC-based control technology, allowing integration with various hardware components via standard interfaces like Ethernet. This contrasts sharply with traditional PLCs that often require proprietary communication protocols or modules for expansion[^1]. #### Advanced Software Environment The programming environment provided by Beckhoff, such as TwinCAT software suite, supports multiple IEC 61131-3 languages alongside C/C++ and MATLAB/Simulink for custom applications development. Traditional PLC vendors may limit developers to only one or two specific programming dialects within their ecosystems[^2]. #### Real-Time Performance With support for real-time operating systems (RTOS), including RTLinux and Windows Embedded Compact, Beckhoff controllers can achieve deterministic behavior required in motion control tasks without sacrificing ease-of-use when configuring these settings from within familiar engineering tools. #### Modular Hardware Architecture Unlike monolithic designs common among competitor offerings where all functions are integrated into single units, EtherCAT-enabled fieldbus terminals allow users to build distributed architectures easily while maintaining synchronization across nodes at microsecond levels. ```python # Example Python code demonstrating connection setup using pyads library import pyads plc = pyams.NetId('5.89.45.12.1') pyads.open_port() pyads.add_route(plc, '127.0.0.1') ``` --related questions-- 1. What are some key differences between Beckhoff's safety solutions versus those offered by Siemens? 2. How does integrating third-party devices compare between Rockwell Automation ControlLogix platforms against Beckhoff's approach? 3. In what ways has open-source support influenced innovation around Beckhoff technologies more than other brands have done so historically? 4. Can you provide examples illustrating how faster cycle times achieved through Beckhoff’s products lead directly to increased productivity on factory floors today? 5. Are there any particular industries where adoption rates favoring either brand over another stand out most prominently based upon technical merits alone rather than market presence factors?
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值