es8311_init()就出问题了
es8311_write_reg i2c全报错,I2C read/write error
但是运行demo i2c tool,可以正常读写ES8311的寄存器,读到的地址是0x18U。
请教一下需要从哪判断问题。
试过ESP IDF5.3.2,ESP IDF5.1.4都是一样的问题。
运行i2S ES8311的demo时,崩溃
Re: 运行i2S ES8311的demo时,崩溃
http://esp32.com/viewtopic.php?f=13&t=4 ... 65#p143865
Code: Select all
i2s es8311 codec example start
-----------------------------
I (363) i2s_es8311: i2s driver init success
E (1363) ES8311: es8311_init(329): I2C read/write error
ESP_ERROR_CHECK failed: esp_err_t 0x107 (ESP_ERR_TIMEOUT) at 0x42007890
--- 0x42007890: es8311_codec_init at E:/ESPproject/i2s_es8311/main/i2s_es8311_example.c:61 (discriminator 1)
file: "./main/i2s_es8311_example.c" line 61
Re: 运行i2S ES8311的demo时,崩溃
在i2c tool里面都是正常的
i2c tool的i2c在5.1.3上用的旧驱动
在5.3.2上用的新驱动
测试起来都正常
i2s es8311里面一直是旧的I2C
Code: Select all
i2c-tools> i2cdetect
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- 18 -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
i2c-tools> i2cset -c 0x18 -r 0x00 0x1A
I (538875) cmd_i2ctools: Write OK
i2c-tools> i2cget -c 0x18 -r 0x00 -l 1
0x1a
i2c-tools> i2cset -c 0x18 -r 0x00 0x2B
I (570835) cmd_i2ctools: Write OK
i2c-tools> i2cget -c 0x18 -r 0x00 -l 1
0x2b
Code: Select all
#include "driver/i2c.h"
Code: Select all
#include "driver/i2c_master.h"
i2s es8311里面一直是旧的I2C
Code: Select all
#include "driver/i2c.h"
Who is online
Users browsing this forum: No registered users and 40 guests