ESP32与ADS131通过SPI通信读取采样数值。配置AD芯片为8ksps采样率。通过AD芯片的RDY脚作为外部中断,启动SPI读取数据。由于AD芯片的4个通道都打开了,所以每次中断读取6个32位数据,中间4个数据为对应4个通道的数据,头尾两个数据通过外部中断服务程序修改为1个32位timestamp,1个32位帧尾。中断服务程序中不断将读取到的数据首先打包成FRAMES_BUF_SIZE个数据,每包数据再压入到data_queue中。print_task任务判断data_queue中只要有数据,就通过UDP发送出去。现在的问题:
1,程序运行一阵后,会出现报错,报错信息为
E (152188) task_wdt: Task watchdog got triggered. The following tasks/users did not reset the watchdog in time:
E (152188) task_wdt: - IDLE1 (CPU 1)
E (152188) task_wdt: Tasks currently running:
E (152188) task_wdt: CPU 0: IDLE0
E (152188) task_wdt: CPU 1: print_task
E (152188) task_wdt: Print CPU 1 backtrace
2,程序会时不时的出现E (5748) My_spike: Error occurred during sending: errno 12,我查了下,好像是UDP发送缓冲区满了。想保证每帧数据都能成功发送出去。
请问各位该如何处理这些问题。谢谢
ESP32与ADS131芯片通信报错
-
dongdongmaomao
- Posts: 7
- Joined: Thu Aug 19, 2021 9:28 am
ESP32与ADS131芯片通信报错
- Attachments
-
- main.c
- (9.13 KiB) Downloaded 7 times
-
- ads131m0x.h
- (945 Bytes) Downloaded 9 times
-
- ads131m0x.c
- (8.45 KiB) Downloaded 11 times
Who is online
Users browsing this forum: No registered users and 2 guests