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 2013 Threads] portENTER_CRITICAL() with-in and ISR in AVR32Posted by Alexis on March 25, 2013 I have read in multiple area that FreeRTOS calls with "FromISR" should be called with-in an ISR. I have also seen threads where users are specifically told not to use "portENTER_CRITICAL" with-in and ISR, these threads always refer to the ARM Cortex port. I have been surrounding all my calls with-in ISR as follows: portENTER_CRITICAL(); xSemaphoreGiveFromISR( m_TransmitMobSemaphore, &xHigherPriorityTaskWoken ); portEXIT_CRITICAL();
Now i am having an intermitted problem and trying to track it down. Not sure if Stack, or interrupts at the moment. But re-reading the manual and the forums i have found that i may well have made a mistake by using "portENTER_CRITICAL();" with-in interrupts. Now the question is: vTick() in port.c which is provided with the AVR32 port FreeRTOS V7.0.0 does the following /* Because FreeRTOS is not supposed to run with nested interrupts, put all OS calls in a critical section . */ portENTER_CRITICAL(); vTaskIncrementTick(); portEXIT_CRITICAL();
Is that a mistake? is this a special case? Should i leave all my portENTER_CRITICAL(); in my ISR's? Regards, Alexis
RE: portENTER_CRITICAL() with-in and ISR in AVR32Posted by Dave on March 25, 2013 Documentation pages for demos always have an "Interrupt Service Routines" section, and the section on the AVR32 page http://www.freertos.org/portAVR32.html says to place the calls in critical sections.
This is an old and I think obsolete port for old AVR32 chips that behave a bit differently to the new ones. The maintained AVR32 code is in the Atmel Software Framework (found at Atmel.com).
RE: portENTER_CRITICAL() with-in and ISR in AVR32Posted by Alexis on March 25, 2013 Thanks for the quick reply. Looking at the linked page it does seem to have some slight differences to what is available in the my port, any idea what release that page refers to?
I will keep the critical sections in the code as advised by the link.
Looking at Atmel, they have both 7.0.0 (currently being used) and 7.3.0 in the latest ASF release.I would be weary of moving to 7.3.0 as it would require more validation, will look for a release history so i can see what was fixed.
RE: portENTER_CRITICAL() with-in and ISR in AVR32Posted by Richard on March 25, 2013 The changes to the FreeRTOS core files can be found here: http://www.FreeRTOS.org/History.txt. You would have to look at any history information provided by Atmel to see any changes made to the port layer they maintain.
Regards.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|