暖夕夏

暖夕夏

0个粉丝

1

问答

0

专栏

0

资料

暖夕夏  发布于  2022-09-21 11:14:19
采纳率 0%
1个问答
1635

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

  1. ES8374_Write_Reg( 0x00,0x3F); //IC Rst start
  2. delay_1ms(1);
  3. ES8374_Write_Reg( 0x00,0x03); //IC Rst stop
  4. ES8374_Write_Reg( 0x01,0x7F); //IC clk on
  5. ES8374_Write_Reg( 0x02,0x08); //select PLL
  6. ES8374_Write_Reg( 0x03,0x20); //osr =32
  7. ES8374_Write_Reg( 0x6F,0xA0); //pll set:mode enable
  8. ES8374_Write_Reg( 0x72,0x41); //pll set:mode set
  9. ES8374_Write_Reg( 0x09,0x01); //pll set:reset on ,set start //vcoout devided by 8
  10. ES8374_Write_Reg( 0x0C,0x08); //pll set:k
  11. ES8374_Write_Reg( 0x0D,0x13); //pll set:k
  12. ES8374_Write_Reg( 0x0E,0xe0); //pll set:k
  13. ES8374_Write_Reg( 0x0A,0x8A); //pll set:
  14. ES8374_Write_Reg( 0x0B,0x08);//pll set:n
  15. ES8374_Write_Reg( 0x09,0x41); //pll set:reset off ,set stop
  16. ES8374_Write_Reg( 0x05,0x11); //clk div =1
  17. ES8374_Write_Reg( 0x06,0x01); //LRCK div =0100H = 256D
  18. 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

  1. ES8374_Write_Reg( 0x24,0x08); //adc set
  2. ES8374_Write_Reg( 0x36,0x00); //dac set
  3. ES8374_Write_Reg( 0x12,0x30); //timming set
  4. ES8374_Write_Reg( 0x13,0x20); //timming set
  5. ES8374_Write_Reg( 0x21,0x50); //adc set: SEL LIN1 CH+PGAGAIN=0DB
  6. ES8374_Write_Reg( 0x22,0xFF); //adc set: PGA GAIN=0DB
  7. ES8374_Write_Reg( 0x21,0x14); //adc set: SEL LIN1 CH+PGAGAIN=18DB
  8. ES8374_Write_Reg( 0x22,0x55); //pga = +15db
  9. ES8374_Write_Reg( 0x00,0x80); // IC START
  10. ES8374_Write_Reg( 0x14,0x8A); // IC START
  11. ES8374_Write_Reg( 0x15,0x40); // IC START
  12. ES8374_Write_Reg( 0x1A,0x01); // monoout set
  13. ES8374_Write_Reg( 0x1B,0x09); // monoout set
  14. ES8374_Write_Reg( 0x1C,0x90); // spk set
  15. ES8374_Write_Reg( 0x1D,0x02); // spk set
  16. ES8374_Write_Reg( 0x1F,0x00); // spk set
  17. ES8374_Write_Reg( 0x1E,0xA0); // spk on
  18. ES8374_Write_Reg( 0x28,0x00); // alc set
  19. ES8374_Write_Reg( 0x25,0x00); // ADCVOLUME on
  20. ES8374_Write_Reg( 0x38,0x00); // DACVOLUMEL on
  21. ES8374_Write_Reg( 0x6D,0x60); //SEL:GPIO1=DMIC CLK OUT+SEL:GPIO2=PLL CLK OUT
  22. ES8374_Write_Reg( 0x71,0x05);
  23. ES8374_Write_Reg( 0x73,0x70);
  24. //开启转换
  25. ES8374_Write_Reg( 0x36,0x00); //dac set
  26. ES8374_Write_Reg( 0x37,0x00); // dac set
  27. //ALC 10000100=0x84
  28. ES8374_Write_Reg( 0x26,0x84);
  29. //5bit large=高增益 11011=0x1B
  30. ES8374_Write_Reg( 0x27,0x1B);
  31. //11110000
  32. ES8374_Write_Reg( 0x28,0xF0);
  33. //0x29 alc decay time and attack time default:110010=0x32
  34. ES8374_Write_Reg( 0x29,0x32);
  35. //0x2b noise gate default:0
  36. ES8374_Write_Reg( 0x2B,0x0);
  37. //////////////////////MONO声音输出控制
  38. //11100 001=0xe1
  39. ES8374_Write_Reg( 0x1A,0xe1);
  40. //1001 1011
  41. ES8374_Write_Reg( 0x1B,0x9b);
  42. //////mix
  43. //mix 11001000
  44. ES8374_Write_Reg( 0x1C,0xC8);
  45. //mixer gain
  46. //1000 1011
  47. ES8374_Write_Reg( 0x1B,0x9b);
  48. /////////////////////PGA
  49. //地址0x21
  50. //mic in :0001 1100=0x1c
  51. //ES8374_Write_Reg( 0x21,0x1c);
  52. //line in:0010 1100=0x3c
  53. //ES8374_Write_Reg( 0x21,0x2c);
  54. //mic and line in
  55. //line in:0011 1100=0x3c
  56. ES8374_Write_Reg( 0x21,0x3c);
  57. //////////////////////ADC
  58. //jack detect 0x2c default:1101=0xd 通过GPIO或者RLIN1控制是否声音输出,会导致speakers静音
  59. //7-1:RLin1 1010 1101=0xad
  60. //ES8374_Write_Reg( 0x2c,0xad);
  61. ////0x2d ADC_SDP_SC-7 11100110=0xe6 会有背景噪声
  62. //ES8374_Write_Reg( 0x2d,0xE6);
  63. /////////////////////DAC
  64. //0x36 00000100=0x4 默认 SDP左输出
  65. ES8374_Write_Reg( 0x36, 0x4);
  66. //0x37 00000000 DAC DSM not mute=0x0
  67. ES8374_Write_Reg( 0x37, 0x0);
  68. //0x38 00000000 衰减 0=0db 最大11000000=-96db
  69. ES8374_Write_Reg( 0x38, 0xC0);
我来回答
回答0个
时间排序
认可量排序
易百纳技术社区暂无数据
或将文件直接拖到这里
悬赏:
E币
网盘
* 网盘链接:
* 提取码:
悬赏:
E币

Markdown 语法

  • 加粗**内容**
  • 斜体*内容*
  • 删除线~~内容~~
  • 引用> 引用内容
  • 代码`代码`
  • 代码块```编程语言↵代码```
  • 链接[链接标题](url)
  • 无序列表- 内容
  • 有序列表1. 内容
  • 缩进内容
  • 图片![alt](url)
+ 添加网盘链接/附件

Markdown 语法

  • 加粗**内容**
  • 斜体*内容*
  • 删除线~~内容~~
  • 引用> 引用内容
  • 代码`代码`
  • 代码块```编程语言↵代码```
  • 链接[链接标题](url)
  • 无序列表- 内容
  • 有序列表1. 内容
  • 缩进内容
  • 图片![alt](url)
相关问答
无更多相似问答 去提问
举报反馈

举报类型

  • 内容涉黄/赌/毒
  • 内容侵权/抄袭
  • 政治相关
  • 涉嫌广告
  • 侮辱谩骂
  • 其他

详细说明

易百纳技术社区