初级会员
- 积分
- 78
- 金钱
- 78
- 注册时间
- 2020-5-6
- 在线时间
- 19 小时
|
10金钱
最近在做modbustcp从站,用CubeMX配置的freertos+lwip工程,采用freemodbus源码demo中MCF5235TCP中的接口文件移植的freemodbus,硬件为阿波罗F429,程序运行一段时间后会崩溃,打印信息为:
Assertion "pcb->snd_queuelen >= pbuf_clen(next->p)" failed at line 1111 in ../Middlewares/Third_Party/LwIP/src/core/tcp_in.c
Assertion "pbuf_free: p->ref > 0" failed at line 753 in ../Middlewares/Third_Party/LwIP/src/core/pbuf.c
DEBUG: MBTCP-CLOSE: Closed connection to 192.168.0.182.
Assertion "pcb->snd_queuelen >= pbuf_clen(next->p)" failed at line 1111 in ../Middlewares/Third_Party/LwIP/src/core/tcp_in.c
DEBUG: MBTCP-ACCEPT: Accepted new client 192.168.0.182
Assertion "pcb->snd_queuelen >= pbuf_clen(next->p)" failed at line 1111 in ../Middlewares/Third_Party/LwIP/src/core/tcp_in.c
Assertion "pbuf_free: p->ref > 0" failed at line 753 in ../Middlewares/Third_Party/LwIP/src/core/pbuf.c
Assertion "mem_free: illegal memory: double free" failed at line 652 in ../Middlewares/Third_Party/LwIP/src/core/mem.c
Assertion "pbuf_free: p->ref > 0" failed at line 753 in ../Middlewares/Third_Party/LwIP/src/core/pbuf.c
有大神遇到过这种情况吗,是什么原因导致的
|
最佳答案
查看完整内容[请看2#楼]
问题已经解决,原因是lwip内核任务tcpip_thread的优先级设置的比modbus任务优先级高,将后者优先级设置比前者大后,运行正常,目前没有出现掉线崩溃的现象
|