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] [November 2015 Threads] FreeRTOS sets the systick and pendsv priority to the lowest onePosted by dijex on November 10, 2015 Hello,
Debugging some priority issues I saw that the scheduler start sets the systick and pendsv priority to the lowest one.
/* Make PendSV and SysTick the lowest priority interrupts. */
portNVICSYSPRI2REG |= portNVICPENDSVPRI;
portNVICSYSPRI2REG |= portNVICSYSTICKPRI;
Could you please explain to me why it is mandatory to set those interrupts to the lowest priority and what is the impact if they are kept in the highest priority.
Thanks a lot for your support.
With regards.
FreeRTOS sets the systick and pendsv priority to the lowest onePosted by rtel on November 11, 2015 The PendSV interrupt is the only place a context switch occurs. If a context switch is requested from an interrupt, then the PendSV interrupt is pended, and when the interrupt exits, the PendSV interrupt handler executes and performs the context switch. If the PendSV interrupt is not the lowest priority interrupt then the PendSV handler might execute as soon as it is pended, and so nest with the original interrupt. Also, consider that interrupts can nest, and if there is more than one nested interrupt that requests a context switch then you only want the PendSV handler to execute once, and only when the nested interrupts have all completed.
Regards.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|