There is not an official Actel port, which means I don’t really know which code you are using. However, all the Cortex M3 ports that are in the official release all use the same port layer code - the only difference being the compiler used. There is a port for GCC (including Rowley, Code Red, Atollic, etc), Keil, and IAR. Which are you using?
I would suggest looking at the documentation page on the FreeRTOS site for an existing CM3 port to see how it tells you do perform an ‘in ISR’ context switch - or look at examples for other cortex M3 chips in the main download.
i am using the actel smartfusion webserver demo with Free RTOS i am using eclipse with the softconsole from actel, i beleicve this is Gcc as it is free. this is just strange as for some reason after 12k messages the thread stops receiving them?
i have checked the return code from the post function and this allways returns ok but the receive dosn’t allways happen?
The macro to use then is portEND_SWITCHING_ISR(), not taskYIELD_FROM_ISR().
If you are sending a lot of messages character by character consider using a ring buffer instead, and just send a single message to the task that processes the data once a complete message has been received.
Also, what have you set the priority of the interrupt to? It must be equal to or below configMAX_SYSCALL_INTERRUPT_PRIORITY, remembering that high numeric values denote ***low*** interrupt priorities, and that different functions provided by different vendors want the interrupt priority specified in different ways (some wanted shifted into the most significant bits, while others want it in the least significant bits and do the shifting internally within the driver). Definitely ***do not*** leave the interrupt at its default priority as this will be 0 and therefore the highest priority in the system.
the interrupts in the ACTEL port have not been conected in any way to your OS and are running in the drivers, i am assuming there is someway to write interrupts using Free RTOS that connects it into the RTOS and keeps everythign working.
you talk about a ACTEL official port any idea on a timeline for this?
/* This is the raw value as per the Cortex-M3 NVIC. Values can be 255
(lowest) to 0 (1?) (highest). */ #define configKERNEL_INTERRUPT_PRIORITY 255
//#define configKERNEL_INTERRUPT_PRIORITY 149 #define configMAX_SYSCALL_INTERRUPT_PRIORITY 191 /* equivalent to 0xb0, or priority 11. */
/* This is the value being used as per the ST library which permits 16
priority values, 0 to 15. This must correspond to the
configKERNEL_INTERRUPT_PRIORITY setting. Here 15 corresponds to the lowest
NVIC value of 255. */
//#define configLIBRARY_KERNEL_INTERRUPT_PRIORITY 15
this loops on it’s self, on further investigation it seems the disable interupts is not working as i still have interrupts firing when it is stuck in the for loop and “uxCriticalNesting” = 1 which means we should be in a critical section with interrupts disabled
This all sounds like an interrupt priority problem. There is one place in the FreeRTOS code where getting stuck in a circular loop is a classic sign of having interrupt priorities set wrong, and it even mentions it in the comments directly above the loop.