I am developing a product that uses the chip of NRF52832 and runs FreeRTOS on the chip to manage my task list.
However, I found that the program would be stuck in the idle task, and it may be that the system had just started to run shortly or after ten or more hours of operation of the system.
I run the following code in vApplicationIdleHook:
void vApplicationIdleHook(void)
{
__set_FPSCR(__get_FPSCR() & ~(0x0000009F));
(void) __get_FPSCR();
NVIC_ClearPendingIRQ(FPU_IRQn);
if(uxTaskPriorityGet(xTaskGetIdleTaskHandle())!=0)
{
APP_ERROR_HANDLER(DEF_ERROR_THREADHEAPFAULT);
}
}
It is found that he will randomly throw this Error code
Does anyone know what’s going on?