Software Interrupt Context Switch not working

Hi, I’m working with a RZT1 Dev board. I started with the freeRTOS demo project for the Cortex R4F. I’m trying to integrate the FreeRTOS+ TCP/IP code. Everything was going well up until ETHER_RECEIVE_CHECK_TASK tries to wait for an interrupt and force a context switch, when it called ulTaskNotifyTake(...).
When this function tries to force a context switch with taskYIELD_WITHIN_API() the stack pointer ends up in the prefetch_handler.
I’m not sure why this is happening, or how I should go about troubleshooting this problem.
Did I forget to setup something which is why the scheduler isn’t servicing this software interrupt?

This most likely caused by stack overflow. You can try several things:

  1. Enable configASSERT in FreeRTOSConfig.h to give you more information if there is any assert happens: refer to Customization - FreeRTOS™
  2. Enable configCHECK_FOR_STACKOVERFLOW (Customization - FreeRTOS™)
  3. With above debug info, you could increase the stack size of ETHER_RECEIVE_CHECK_TASK to see if it will fix the issue.
1 Like