In the dsPIC33 demo, the serial driver interrupt routine has a taskYIELD, but in the Using the FreeRTOS Real Time Kernel, Sep 2011 edition (for the PIC32) stated that only API that end with FromISR are allowed in ISR… why is this an exception?? and not documented??
thanks…
also, in Microchips MPLAB Ver 8.76 there is a FreeRTOS viewing tool for displaying information on the current program… It display information on Task and CoRoutines, but never on Queues??? is it outdated??
/* Get the character and post it on the queue of Rxed characters.
If the post causes a task to wake force a context switch as the woken task
may have a higher priority than the task we have interrupted. */
IFS1bits.U2RXIF = serCLEAR_FLAG;
while( U2STAbits.URXDA )
{
cChar = U2RXREG;
xQueueSendFromISR( xRxedChars, &cChar, &xHigherPriorityTaskWoken );
}
In the dsPIC33 demo, the serial driver interrupt routine has a taskYIELD, but in the Using the FreeRTOS Real Time Kernel, Sep 2011 edition (for the PIC32) stated that only API that end with FromISR are allowed in ISR
The PIC32 book is for the PIC32, which in architecture terms is about as far away from a dsPIC as you can get. Why would it talk about an exception for a dsPIC any more than it would for a Cortex-M3?
Not calling a function that does not end in FromISR from an ISR is a very good general rule in all cases. Some, but not many, ports can tolerate taskYIELD() being called from an ISR, provided it is the last instruction in the ISR. In most cases, where this is the case, the call to taskYIELD() is hidden behind a macro called portYIELD_FROM_ISR(), or portEND_SWITCHING_ISR(). The PIC24/dsPIC port is rather old, and that is probably why it was not done in that case. The documentation page for that port (http://www.freertos.org/portpic24_dspic.html) does however say how it is done, albeit rather briefly.
also, in Microchips MPLAB Ver 8.76 there is a FreeRTOS viewing tool for displaying information on the current program… It display information on Task and CoRoutines, but never on Queues??? is it outdated??