完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
IDF版本5.0,硬件ESP32
我在componentsdriveri2s.c里增加2个变量 volatile int i2s_rx_count = 0; volatile int i2s_tx_count = 0; 在static void IRAM_ATTR i2s_intr_handler_default(void *arg)中 在if ((status & I2S_INTR_OUT_EOF) && p_i2s->tx) 中i2s_tx_count++; 在if ((status & I2S_INTR_IN_SUC_EOF) && p_i2s->rx) 中i2s_rx_count++; 然后在examplesperipheralsi2si2s_adc_dac的main中注释了xTaskCreate(adc_read_task, "ADC read task", 2048, NULL, 5, NULL);防止该线程影响测试, 在i2s_adc_enable(EXAMPLE_I2S_NUM);后每隔一秒打印一次i2s_tx_count和i2s_rx_count I (1351) ad/da: i2s_rx_count = 31 I (1351) ad/da: i2s_tx_count = 31 I (2351) ad/da: i2s_rx_count = 62 I (2351) ad/da: i2s_tx_count = 62 I (3351) ad/da: i2s_rx_count = 93 I (3351) ad/da: i2s_tx_count = 94 I (4351) ad/da: i2s_rx_count = 124 I (4351) ad/da: i2s_tx_count = 125 I (5351) ad/da: i2s_rx_count = 155 I (5351) ad/da: i2s_tx_count = 156 I (6351) ad/da: i2s_rx_count = 186 I (6351) ad/da: i2s_tx_count = 187 I (7351) ad/da: i2s_rx_count = 217 I (7351) ad/da: i2s_tx_count = 219 I (8351) ad/da: i2s_rx_count = 248 I (8351) ad/da: i2s_tx_count = 250 I (9351) ad/da: i2s_rx_count = 279 I (9351) ad/da: i2s_tx_count = 281 I (10351) ad/da: i2s_rx_count = 310 I (10351) ad/da: i2s_tx_count = 312 I (11351) ad/da: i2s_rx_count = 341 I (11351) ad/da: i2s_tx_count = 344 I (12351) ad/da: i2s_rx_count = 372 I (12351) ad/da: i2s_tx_count = 375 I (13351) ad/da: i2s_rx_count = 403 I (13351) ad/da: i2s_tx_count = 406 I (14351) ad/da: i2s_rx_count = 434 I (14351) ad/da: i2s_tx_count = 438 I (15351) ad/da: i2s_rx_count = 465 I (15351) ad/da: i2s_tx_count = 469 I (16351) ad/da: i2s_rx_count = 496 I (16351) ad/da: i2s_tx_count = 500 I (17351) ad/da: i2s_rx_count = 527 I (17351) ad/da: i2s_tx_count = 531 I (18351) ad/da: i2s_rx_count = 558 I (18351) ad/da: i2s_tx_count = 563 I (19351) ad/da: i2s_rx_count = 589 I (19351) ad/da: i2s_tx_count = 594 I (20351) ad/da: i2s_rx_count = 620 I (20351) ad/da: i2s_tx_count = 625 I (21351) ad/da: i2s_rx_count = 651 I (21351) ad/da: i2s_tx_count = 657 I (22351) ad/da: i2s_rx_count = 682 I (22351) ad/da: i2s_tx_count = 688 RX和TX的计数差距随时间增加会误差越大, 如果在I2S_basic中测试RX和TX的计数就没有误差,偶尔误差1应该是打印的间隔误差 |
|
相关推荐
|
|
只有小组成员才能发言,加入小组>>
313 浏览 0 评论
1170 浏览 1 评论
585浏览 6评论
483浏览 5评论
有没有办法在不使用混杂模式的情况下实现Wifi驱动程序接收缓冲区访问中断呢?
468浏览 5评论
467浏览 4评论
442浏览 4评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-26 08:06 , Processed in 0.982548 second(s), Total 74, Slave 58 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号