FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [March 2009 Threads] AT91SAM7A3 portEND_SWITCHING_ISRPosted by Eduardo Goncalves on March 19, 2009 Hi :)
On a interrupt routine I've placed the following code:
uint8 msg; msg = CANOPEN_NEW_RX_MESSAGE; xQueueSendToBackFromISR ( CANopenQueue_handle, &msg, &xHigherPriorityTaskWoken ); portEND_SWITCHING_ISR ( xHigherPriorityTaskWoken );
the task that is performing a:
xQueueReceive ( CANopenQueue_handle, &msg, ...
no longer seems to run.
If I don't use portEND_SWITCHING_ISR then all is well.
Any ideas?
thanks
RE: AT91SAM7A3 portEND_SWITCHING_ISRPosted by MEdwards on March 19, 2009 You don't say which compiler you are using. Have you checked the WEB documentation page for a similar port (sam7 with the same compiler) to see how an ISR should be written? Different compilers have different requirements as to when and how the task context should be saved and restored.
RE: AT91SAM7A3 portEND_SWITCHING_ISRPosted by Eduardo Goncalves on March 19, 2009 I've been using IAR 5.20 on an AT91SAM7A3.
I've taken the AT91SAM7S64 example and created (with small changes, just the include and linker files) a port for the AT91SAM7A3.
I've looked to the example of serial.c for the AT91SAM7S64 but somehow it does not seem to be up to date since it does not use __irq in the declaration of the interrupt routine. So most likely this is from IAR 4 and uses the IRQ_Handler_Entry provided in Cstartup.s79 file.
the same happens with usbsample.c
more ideas, please. :)
RE: AT91SAM7A3 portEND_SWITCHING_ISRPosted by Richard on March 19, 2009 See "an example of an ISR with context switching capabilities" on the following page and all will be clear: http://www.freertos.org/portsam7iar.html
Regards.
RE: AT91SAM7A3 portEND_SWITCHING_ISRPosted by Eduardo Goncalves on March 19, 2009 ... and everything works! :) :)
many thanks
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|