@@ -339,22 +339,22 @@ BaseType_t xPortStartScheduler( void )
339339 if ( ulImplementedPrioBits == 8 )
340340 {
341341 /* When the hardware implements 8 priority bits, there is no way for
342- * the software to configure PRIGROUP to not have sub-priorities. As
343- * a result, the least significant bit is always used for sub-priority
344- * and there are 128 preemption priorities and 2 sub-priorities.
345- *
346- * This may cause some confusion in some cases - for example, if
347- * configMAX_SYSCALL_INTERRUPT_PRIORITY is set to 5, both 5 and 4
348- * priority interrupts will be masked in Critical Sections as those
349- * are at the same preemption priority. This may appear confusing as
350- * 4 is higher (numerically lower) priority than
351- * configMAX_SYSCALL_INTERRUPT_PRIORITY and therefore, should not
352- * have been masked. Instead, if we set configMAX_SYSCALL_INTERRUPT_PRIORITY
353- * to 4, this confusion does not happen and the behaviour remains the same.
354- *
355- * The following assert ensures that the sub-priority bit in the
356- * configMAX_SYSCALL_INTERRUPT_PRIORITY is clear to avoid the above mentioned
357- * confusion. */
342+ * the software to configure PRIGROUP to not have sub-priorities. As
343+ * a result, the least significant bit is always used for sub-priority
344+ * and there are 128 preemption priorities and 2 sub-priorities.
345+ *
346+ * This may cause some confusion in some cases - for example, if
347+ * configMAX_SYSCALL_INTERRUPT_PRIORITY is set to 5, both 5 and 4
348+ * priority interrupts will be masked in Critical Sections as those
349+ * are at the same preemption priority. This may appear confusing as
350+ * 4 is higher (numerically lower) priority than
351+ * configMAX_SYSCALL_INTERRUPT_PRIORITY and therefore, should not
352+ * have been masked. Instead, if we set configMAX_SYSCALL_INTERRUPT_PRIORITY
353+ * to 4, this confusion does not happen and the behaviour remains the same.
354+ *
355+ * The following assert ensures that the sub-priority bit in the
356+ * configMAX_SYSCALL_INTERRUPT_PRIORITY is clear to avoid the above mentioned
357+ * confusion. */
358358 configASSERT ( ( configMAX_SYSCALL_INTERRUPT_PRIORITY & 0x1U ) == 0U );
359359 ulMaxPRIGROUPValue = 0 ;
360360 }
@@ -517,11 +517,12 @@ void xPortSysTickHandler( void )
517517 if ( xTaskIncrementTick () != pdFALSE )
518518 {
519519 traceISR_EXIT_TO_SCHEDULER ();
520+
520521 /* A context switch is required. Context switching is performed in
521522 * the PendSV interrupt. Pend the PendSV interrupt. */
522523 portNVIC_INT_CTRL_REG = portNVIC_PENDSVSET_BIT ;
523524 }
524- else
525+ else
525526 {
526527 traceISR_EXIT ();
527528 }
0 commit comments