rousea wrote on Tuesday, September 08, 2015:
I have found where the ICSR Vector Pending address is set to 0x35: It is when FreeRTOS executes vPortYield():
void vPortYield( void )
{
/* Set a PendSV to request a context switch. */
portNVIC_INT_CTRL_REG = portNVIC_PENDSVSET_BIT;
/* Barriers are normally not required but do ensure the code is completely
within the specified behaviour for the architecture. */
__asm volatile( "dsb" );
__asm volatile( "isb" );
}
portNVIC_INT_CTRL_REG points to the SCB ICSR register. Writing portNVIC_PENDSVSET_BIT to it sets the PENDSVSET bit and simultaneously changes VECTPENDING to 0x35.