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] [December 2010 Threads] freeRTOS critical regionPosted by Nishant Agrawal on December 3, 2010 Hi guys,
I was able to successfully implement other software interrupts on the code, though I have not fully tested it. Now the other thing I am looking forward to implement is to remove disabling of interrupts. Usually with every call to the OS functions there is entering of critical region which disables the interrupt.
Now what I need to confirm is Is the interrupts disabled to prevent the timer interrupt from doing any context switch?? Can other interrupts be allowed to be processed by just disabling the timer interrupt in the critical region. What are the reasons for disabling the interrupts??
I ask this question because with ARM there is a semaphore instruction and if possible I am thinking of implementing it to prevent shared data problem in case of context switches and other OS function calls.
Thanks and regards, Nishant Agrawal
RE: freeRTOS critical regionPosted by Dave on December 3, 2010 I think the reasons for disabling interrupts should be obvious. Critical sections protect code segments from access by ANY interrupt, not just the FreeRTOS interrupts. Any interrupt that calls an API function would have to be disabled.
If you are using an ARM Cortex M3 then the port allows interrupts to nest and has critical section calls that only disable interrupts to a certain priority level. It even has alternative critical section implementations that can be used in interrupts themselves. This should not be a problem for you then.
If you are using an ARM7 then an interrupt nesting implementation is possible but stupidly clumsy, which I guess why its not implemented in the release code.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|