作死,在中断函数里面创建节点,使用了pvPortMalloc()函数,这是不可行的。根据打印的错误,直接定位到文件port.c,441行,文中有
void vPortEnterCritical( void )
{
portDISABLE_INTERRUPTS();
uxCriticalNesting++;
/* This is not the interrupt safe version of the enter critical function so
assert() if it is being called from an interrupt context. Only API
functions that end in "FromISR" can be used in an interrupt. Only assert if
the critical nesting count is 1 to protect against recursive calls if the
assert function also uses a critical section. */
if( uxCriticalNesting == 1 )
{
configASSERT( ( portNVIC_INT_CTRL_REG & portVECTACTIVE_MASK ) == 0 );
}
}
定义已经声明了,关闭中断在中断函数里面是不安全的,在中断函数里面,最好只使用以FromISR结尾的函数,如:
xQueueReceiveFromISR();
xQueueSendFromISR();
好吧好吧,但为什么不可以,再查一下,发现