📌 现象
网络启动后一直报错
Debug: [..\MIDDLEWARES\FreeRTOS\queue.c:1088] Error: ..\MIDDLEWARES\FreeRTOS\queue.c:1088
Debug: [..\MIDDLEWARES\FreeRTOS\portable\RVDS\ARM_CM4F\port.c:768] Error: ..\MIDDLEWARES\FreeRTOS\portable
Debug: [..\MIDDLEWARES\FreeRTOS\portable\RVDS\ARM_CM4F\port.c:441] Error: ..\MIDDLEWARES\FreeRTOS\portable
Debug: [..\MIDDLEWARES\FreeRTOS\portable\RVDS\ARM_CM4F\port.c:441] Error: ..\MIDDLEWARES\FreeRTOS\portable
Debug: [..\MIDDLEWARES\FreeRTOS\portable\RVDS\ARM_CM4F\port.c:441] Error: ..\MIDDLEWARES\FreeRTOS\portable
Debug: [..\MIDDLEWARES\FreeRTOS\queue.c:1084] Error: ..\MIDDLEWARES\FreeRTOS\queue.c:1084
📌 分析
Debug: [..\MIDDLEWARES\FreeRTOS\queue.c:1088] Error: ..\MIDDLEWARES\FreeRTOS\queue.c:1088为函数[[xQueueGiveFromISR()]]报错Debug: [..\MIDDLEWARES\FreeRTOS\portable\RVDS\ARM_CM4F\port.c:768] Error: ..\MIDDLEWARES\FreeRTOS\portable为函数[[vPortValidateInterruptPriority()]]报错Debug: [..\MIDDLEWARES\FreeRTOS\portable\RVDS\ARM_CM4F\port.c:441] Error: ..\MIDDLEWARES\FreeRTOS\portable为函数[[vPortEnterCritical()]]报错
📌 解决
- 根据对[[lwIP-ethernetif.c]]的分析,此报错为以太网收发时序紊乱导致,需加信号量控制。
- 另外FreeRTOS需要将中断优先级分组设为4,只用到抢占优先级,且所有抢占优先级必须>=configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY。