- 收藏
- 点赞
- 分享
- 举报
ES8374 与MCU,配置完成后一点反应也没有
目前用到一款芯片es8374,一直没调通。设计是这样的:设置为48k采样,16bit。 主控32芯片做master,8374做slave。芯片的配置为初始配置,网上有的配置我也试过了,但一直没有听到初始化完成之后喇叭有咔擦的一声,目前读写寄存器也是正常的,有没有大佬可指点一二
这是第一种配置
/ ES8374_Write_Reg(0x00,0x3F); //IC Rst start
// ES8374_Write_Reg(0x00,0x03); //IC Rst stop
// ES8374_Write_Reg(0x01,0x7F); //IC clk on
// ES8374_Write_Reg(0x6F,0xA0); //pll set:mode enable
// ES8374_Write_Reg(0x72,0x41); //pll set:mode set
// ES8374_Write_Reg(0x09,0x01); //pll set:reset on ,set start
// ES8374_Write_Reg(0x0C,0x22); //pll set:k
// ES8374_Write_Reg(0x0D,0x2E); //pll set:k
// ES8374_Write_Reg(0x0E,0xC6); //pll set:k
// ES8374_Write_Reg(0x0A,0x3A); //pll set:
// ES8374_Write_Reg(0x0B,0x07); //pll set:n
// ES8374_Write_Reg(0x09,0x41); //pll set:reset off ,set stop
// ES8374_Write_Reg(0x24,0x08); //adc set
// ES8374_Write_Reg(0x36,0x00); //dac set
// ES8374_Write_Reg(0x12,0x30); //timming set
// ES8374_Write_Reg(0x13,0x20); //timming set
// ES8374_Write_Reg(0x21,0x34); //adc set: SEL LIN1 CH+PGAGAIN=0DB
// ES8374_Write_Reg(0x22,0xFF); //adc set: PGA GAIN=0DB
// ES8374_Write_Reg(0x21,0x10); //adc set: SEL LIN1 CH+PGAGAIN=0DB
// ES8374_Write_Reg(0x00,0x80); // IC START
// delay_1ms(50); //DELAY_MS
// ES8374_Write_Reg(0x14,0x8A); // IC START
// ES8374_Write_Reg(0x15,0x40); // IC START
// ES8374_Write_Reg(0x1A,0xA0); // monoout set
// ES8374_Write_Reg(0x1B,0x19); // monoout set
// ES8374_Write_Reg(0x1C,0x90); // spk set
// ES8374_Write_Reg(0x1D,0x02); // spk set
// ES8374_Write_Reg(0x1F,0x00); // spk set
// ES8374_Write_Reg(0x1E,0xA0); // spk on
// ES8374_Write_Reg(0x28,0x00); // alc set
// ES8374_Write_Reg(0x25,0x00); // ADCVOLUME on
// ES8374_Write_Reg(0x38,0x00); // DACVOLUMEL on
// ES8374_Write_Reg(0x37,0x00); // dac set
// ES8374_Write_Reg(0x6D,0x60); //SEL:GPIO1=DMIC CLK OUT+SEL:GPIO2=PLL CLK OUT
//
以此为分界线,这个是第二种配置
// ES8374_Write_Reg(0x00,0x3F);
// ES8374_Write_Reg(0x00,0x03);
// ES8374_Write_Reg(0x01,0x7F);
// ES8374_Write_Reg(0x05,0x11);
// ES8374_Write_Reg(0x6F,0xA0);
// ES8374_Write_Reg(0x72,0x41);
// ES8374_Write_Reg(0x09,0x01);
// ES8374_Write_Reg(0x0C,0x22);
// ES8374_Write_Reg(0x0D,0x2E);
// ES8374_Write_Reg(0x0E,0xC6);
// ES8374_Write_Reg(0x0A,0x4A);
// ES8374_Write_Reg(0x0B,0x07);
// ES8374_Write_Reg(0x09,0x41);
// ES8374_Write_Reg(0x24,0x08);
// ES8374_Write_Reg(0x36,0x00);
// ES8374_Write_Reg(0x12,0x30);
// ES8374_Write_Reg(0x13,0x20);
// ES8374_Write_Reg(0x21,0x50);
// ES8374_Write_Reg(0x22,0xFF);
// ES8374_Write_Reg(0x21,0x10);
// ES8374_Write_Reg(0x00,0x80);
//
// delay_1ms(50);
//
// ES8374_Write_Reg(0x14,0x8A);
// ES8374_Write_Reg(0x15,0x40);
// ES8374_Write_Reg(0x1B,0x19);
// ES8374_Write_Reg(0x1C,0x90);
// ES8374_Write_Reg(0x1D,0x2B);
// ES8374_Write_Reg(0x1F,0x00);
// ES8374_Write_Reg(0x28,0x00);
// ES8374_Write_Reg(0x25,0x00);
// ES8374_Write_Reg(0x38,0x00);
// ES8374_Write_Reg(0x37,0x00);
// ES8374_Write_Reg(0x6D,0x60);
//
以此为分界线,这个是第三种配置
//soft reset
ES8374_Write_Reg( 0x00,0x3F); //IC Rst start
delay_1ms(1);
ES8374_Write_Reg( 0x00,0x03); //IC Rst stop
ES8374_Write_Reg( 0x01,0x7F); //IC clk on
ES8374_Write_Reg( 0x02,0x08); //select PLL
ES8374_Write_Reg( 0x03,0x20); //osr =32
ES8374_Write_Reg( 0x6F,0xA0); //pll set:mode enable
ES8374_Write_Reg( 0x72,0x41); //pll set:mode set
ES8374_Write_Reg( 0x09,0x01); //pll set:reset on ,set start //vcoout devided by 8
ES8374_Write_Reg( 0x0C,0x08); //pll set:k
ES8374_Write_Reg( 0x0D,0x13); //pll set:k
ES8374_Write_Reg( 0x0E,0xe0); //pll set:k
ES8374_Write_Reg( 0x0A,0x8A); //pll set:
ES8374_Write_Reg( 0x0B,0x08);//pll set:n
ES8374_Write_Reg( 0x09,0x41); //pll set:reset off ,set stop
ES8374_Write_Reg( 0x05,0x11); //clk div =1
ES8374_Write_Reg( 0x06,0x01); //LRCK div =0100H = 256D
ES8374_Write_Reg( 0x07,0x00);
// ES8374_Write_Reg( 0x0F,0x04); //MASTER MODE, BCLK = MCLK/4
ES8374_Write_Reg( 0x10,0x0C); //I2S-16BIT, ADC
ES8374_Write_Reg( 0x11,0x0C); //I2S-16BIT, DAC
ES8374_Write_Reg( 0x24,0x08); //adc set
ES8374_Write_Reg( 0x36,0x00); //dac set
ES8374_Write_Reg( 0x12,0x30); //timming set
ES8374_Write_Reg( 0x13,0x20); //timming set
ES8374_Write_Reg( 0x21,0x50); //adc set: SEL LIN1 CH+PGAGAIN=0DB
ES8374_Write_Reg( 0x22,0xFF); //adc set: PGA GAIN=0DB
ES8374_Write_Reg( 0x21,0x14); //adc set: SEL LIN1 CH+PGAGAIN=18DB
ES8374_Write_Reg( 0x22,0x55); //pga = +15db
ES8374_Write_Reg( 0x00,0x80); // IC START
ES8374_Write_Reg( 0x14,0x8A); // IC START
ES8374_Write_Reg( 0x15,0x40); // IC START
ES8374_Write_Reg( 0x1A,0x01); // monoout set
ES8374_Write_Reg( 0x1B,0x09); // monoout set
ES8374_Write_Reg( 0x1C,0x90); // spk set
ES8374_Write_Reg( 0x1D,0x02); // spk set
ES8374_Write_Reg( 0x1F,0x00); // spk set
ES8374_Write_Reg( 0x1E,0xA0); // spk on
ES8374_Write_Reg( 0x28,0x00); // alc set
ES8374_Write_Reg( 0x25,0x00); // ADCVOLUME on
ES8374_Write_Reg( 0x38,0x00); // DACVOLUMEL on
ES8374_Write_Reg( 0x6D,0x60); //SEL:GPIO1=DMIC CLK OUT+SEL:GPIO2=PLL CLK OUT
ES8374_Write_Reg( 0x71,0x05);
ES8374_Write_Reg( 0x73,0x70);
//开启转换
ES8374_Write_Reg( 0x36,0x00); //dac set
ES8374_Write_Reg( 0x37,0x00); // dac set
//ALC 10000100=0x84
ES8374_Write_Reg( 0x26,0x84);
//5bit large=高增益 11011=0x1B
ES8374_Write_Reg( 0x27,0x1B);
//11110000
ES8374_Write_Reg( 0x28,0xF0);
//0x29 alc decay time and attack time default:110010=0x32
ES8374_Write_Reg( 0x29,0x32);
//0x2b noise gate default:0
ES8374_Write_Reg( 0x2B,0x0);
//////////////////////MONO声音输出控制
//11100 001=0xe1
ES8374_Write_Reg( 0x1A,0xe1);
//1001 1011
ES8374_Write_Reg( 0x1B,0x9b);
//////mix
//mix 11001000
ES8374_Write_Reg( 0x1C,0xC8);
//mixer gain
//1000 1011
ES8374_Write_Reg( 0x1B,0x9b);
/////////////////////PGA
//地址0x21
//mic in :0001 1100=0x1c
//ES8374_Write_Reg( 0x21,0x1c);
//line in:0010 1100=0x3c
//ES8374_Write_Reg( 0x21,0x2c);
//mic and line in
//line in:0011 1100=0x3c
ES8374_Write_Reg( 0x21,0x3c);
//////////////////////ADC
//jack detect 0x2c default:1101=0xd 通过GPIO或者RLIN1控制是否声音输出,会导致speakers静音
//7-1:RLin1 1010 1101=0xad
//ES8374_Write_Reg( 0x2c,0xad);
////0x2d ADC_SDP_SC-7 11100110=0xe6 会有背景噪声
//ES8374_Write_Reg( 0x2d,0xE6);
/////////////////////DAC
//0x36 00000100=0x4 默认 SDP左输出
ES8374_Write_Reg( 0x36, 0x4);
//0x37 00000000 DAC DSM not mute=0x0
ES8374_Write_Reg( 0x37, 0x0);
//0x38 00000000 衰减 0=0db 最大11000000=-96db
ES8374_Write_Reg( 0x38, 0xC0);
Markdown 语法
- 加粗**内容**
- 斜体*内容*
- 删除线~~内容~~
- 引用> 引用内容
- 代码`代码`
- 代码块```编程语言↵代码```
- 链接[链接标题](url)
- 无序列表- 内容
- 有序列表1. 内容
- 缩进内容
- 图片![alt](url)
-
2019-08-23 21:54:50
-
2020-04-24 03:46:17
-
2013-11-19 11:53:24
-
2020-12-24 09:23:38
-
2019-06-05 15:24:15
-
2016-09-01 22:39:49
-
2018-12-18 17:37:21
-
2020-09-24 15:04:04
-
2019-01-22 17:19:16
-
2017-12-11 10:47:49
-
2017-02-22 11:37:06
-
2021-04-27 17:53:46
-
2024-04-08 10:46:33
-
2023-09-19 12:15:44
-
2024-02-20 10:30:35
-
2020-08-29 10:16:26
-
2018-12-08 11:59:33
-
2024-07-19 17:49:53
-
2021-02-19 14:42:52
-
5SS928的emmc有32GB,bootargs设置使用16GB,但是为啥能用的只有rootfs的大小
-
33SS928怎样烧写ubuntu系统
-
10ToolPlatform下载rootfs提示网络失败
-
10谁有GK7205V500的SDK
-
5Hi3516CV610 烧录不进去
-
10Hi3559AV100 芯片硬解码h265编码格式的视频时出现视频播放错误,解码错误信息 s32PackErr:码流有错
-
5海思SS928 / SD3403的sample_venc.c摄像头编码Demo中,采集到的摄像头的YUV数据在哪个相关的函数中?
-
5海鸥派openEuler无法启动网卡,连接WIFI存在问题
-
66有没有ISP相关的巨佬帮忙看看SS928对接IMX347的图像问题
-
50求助hi3559与FPGA通过SLVS-EC接口对接问题
举报类型
- 内容涉黄/赌/毒
- 内容侵权/抄袭
- 政治相关
- 涉嫌广告
- 侮辱谩骂
- 其他
详细说明