[S3] epd_board_poweron will block while using i2s audio.
Closed this issue · 1 comments
lanistor commented
I found a wired behavior: When playing audio file by i2s, call epd_board_poweron
will block at while (!(pca9555_read_input(config_reg.port, 1) & CFG_PIN_PWRGOOD))
, when no audio play, it works fine.
- If don't call
i2s_write
, it works fine, even had installed i2s driver. - I run speaker on a new task on
core 1
, had tested priority from1~configMAX_PRIORITIES
, all had problem. i found epdiy using bothcore0
andcore1
for painting. - this behavior has no error output at all
I don't why the i2s port will effect i2c port. How should i debug this problem? may your give me some advice?
Will it be hardware problem? if so, how to debug it?
I2S port:
- bck:
11
- ws:
I2
- data out:
13
static void epd_board_poweron(epd_ctrl_state_t* state) {
epd_ctrl_state_t mask = {
.ep_output_enable = true,
.ep_mode = true,
.ep_stv = true,
};
state->ep_stv = true;
state->ep_mode = false;
state->ep_output_enable = true;
config_reg.wakeup = true;
epd_board_set_ctrl(state, &mask);
config_reg.pwrup = true;
epd_board_set_ctrl(state, &mask);
config_reg.vcom_ctrl = true;
epd_board_set_ctrl(state, &mask);
ESP_LOGW("####", "epd_board_poweron 4");
// give the IC time to powerup and set lines
vTaskDelay(1);
ESP_LOGW("####", "epd_board_poweron 5");
while (!(pca9555_read_input(config_reg.port, 1) & CFG_PIN_PWRGOOD)) {
}
ESP_LOGW("####", "epd_board_poweron 6");
ESP_ERROR_CHECK(tps_write_register(config_reg.port, TPS_REG_ENABLE, 0x3F));
...
}
Here is parital log:
I (37603) epdiy: Using optimized vector implementation on the ESP32-S3, only 1k of 65536 LUT in use!
W (37603) ####: epd_board_set_ctrl after
W (37773) ####: epd_board_set_ctrl after
I (37773) epdiy: diff: 3ms, draw: 175ms, buffer update: 1ms, total: 179ms
W (37773) epdiy_flush: is_last. lv_disp_flush_ready after 4
W (37783) ####: epd_board_set_ctrl after
W (37793) ####: epd_board_set_ctrl after
W (37793) epdiy_flush: is_last. lv_disp_flush_ready after 5
W (37793) epdiy_flush: is_last. flush after, _paint_type: 0 area: x1=774, y1=660, x2=887, y2=723
I (39963) MP3_PLAYER: mp3file info---bitrate=80000,layer=3,nChans=2,samprate=44100,outputSamps=2304
W (40403) epdiy_flush: area: x1=267, y1=351, x2=833, y2=435
W (40413) epdiy_flush: is_last. lv_disp_flush_ready after, _paint_type: 0, area: x1=267, y1=351, x2=833, y2=435
W (40413) epdiy_flush: is_last. lv_disp_flush_ready after 1
I (40423) epdiy_flush MEMORY: internal heap: 96267; spi heap: 2309007.
W (40423) epdiy_flush: is_last. lv_disp_flush_ready after 2
W (40433) ####: epd_board_set_ctrl after
W (40443) ####: epd_board_set_ctrl after
W (40443) ####: epd_board_set_ctrl after
W (40443) ####: epd_board_poweron 4
W (40463) ####: epd_board_poweron 5
I (41583) I2S: DMA queue destroyed
I (41583) AUDIO: deinit i2s all. has_speaker: 1
I (41583) PCF8574_SERVICE: setPinLevel 2=0
I (41583) PCF8574_SERVICE: INT:1; P0:0, P1:0, P2:0, P3:0, P4:0, P5:0, P6:1, P7:0
martinberlin commented
Hello @lanistor
Since you closed this without commenting anything, can you share how you corrected this?
Maybe it will be useful for someone hitting the same problem