About the "configKERNEL INTERRUPT PRIORITY" value

well, a TRAP IS a software interrupt handler. There must also be an entry in your IVT for trap 15, and it is subject to masking.

I don’t remember what the priority and masking rules for your POD is, but if the priority of your TRAP handler is not the lowest interrupt priority, it may well explain your problems.

EDIT: I just checked with the 68332 Reference Manual, which of course may differ in details from your POD, but the basic operation should be compatible. The TRAP vectors are in locations 32-47 of your IVT, and it seems as if all traps have a higher priority than all interrupts, which in my understanding is not FreeRTOS architecture compliant. You should try rewriting your context switch architecture.

Editedit: Maybe this here link provides more useful info:, even if it already quite old: trap instruction for taskYIELD