Quantcast
Channel: Infineon Forums
Viewing all articles
Browse latest Browse all 9892

Default Handler disrupting FreeRTOS program

$
0
0
I have the same problem, I guess, when trying to give a semaphore from an interrupt.

If I then call portYIELD_FROM_ISR( xHigherPriorityTaskWoken ); after the xSemaphoreGiveFromISR( xSemaphore, &xHigherPriorityTaskWoken )
the same problem occurs, this has however nothing to do with ADC default handlers, even though it points there initialy

you need to trap the Hardfault_Handler (place code in main.c)
Quote:

void HardFault_Handler(void)
{
int systemControlBlock = SCB->HFSR; //should be 0x40000000 = FORCED hard fault, check CFSR
int configurableFaultStatusReg = SCB->CFSR; // xmc ref manual 2-75 (p.131)
__ASM volatile("BKPT #01"); // enter breakpoint

while(1);
}
there you can check the registers, and it is actualy an INVPC-Event which causes that Problem "Invalid PC load Usage Fault, caused by an invalid EXC_RETURN value"

I have no idea how to solve this however (XMC4500 HexagonKit AB-stepping). If I do not call portYIELD_FROM_ISR( xHigherPriorityTaskWoken ); there is no problem, but it then only switches to the newly unblocked task with the next Systick, which is of course unacceptable in a realtime system.

Viewing all articles
Browse latest Browse all 9892

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>