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] [June 2009 Threads] AVR32: portEnterCritical vs DisableInterruptsPosted by Jeff Henshaw on June 19, 2009 vportEnterCritical() disables all interrupts and then increments ulCriticalNesting.
My question is when should I use one versus the other? I'm not sure what ulCriticalNesting is for, there's a number of things in the AVR32 port that don't match the documentation. Probably because the AVR32 is kinda weird. :-)
Also, any issues using vportEnterCritical() before the scheduler is running?
Thanks !
RE: AVR32: portEnterCritical vs DisableInterrPosted by Richard on June 19, 2009 The only method of disabling and enabling interrupts that should be used are calls to taskENTER_CRITICAL() and taskEXIT_CRITICAL() as these maintain a nesting count. You should not manipulate ulCriticalNesting directly, it is purely for use of the kernel.
It is fine to use the macros before the scheduler has started, but interrupts will remain disabled until the scheduler has been started.
Also note that some ports don't disable all interrupts, but only those up to the priority used by the kernel.
Regards.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|