Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem


Loading

Interrupt arriving at the same time

Posted by jj1010 on October 14, 2014

I use FreeRTOS in Cortex-M3 architecture. My question is:

1 When Systick interrupt and other interrupt arriving at the same time, How FreeRTOS works?

2 If other interrupt preempts Systick interrupt when they arriving at the same time, Systick handler will be deffed. Whether to set the Systick priority highest to ensure the accuracy of the System tick?


Interrupt arriving at the same time

Posted by rtel on October 14, 2014

1 When Systick interrupt and other interrupt arriving at the same time, How FreeRTOS works?

How that works is dependent on the hardware (Cortex-M in this case). FreeRTOS is just software and cannot change how the hardware functions - so the answer is in the hardware reference manuals.

2 If other interrupt preempts Systick interrupt when they arriving at the same time, Systick handler will be deffed. Whether to set the Systick priority highest to ensure the accuracy of the System tick?

The SysTick must be the lowest priority interrupt. Again the hardware will take care of it for you - and you will only get into a time slippage issue if you are executing an interrupt handler that takes more than one entire tick interrupt time to execute (that is - more than the time between two tick interrupts).

Regards.


Interrupt arriving at the same time

Posted by jj1010 on October 14, 2014

Other tasks want a definite time delay, but the time slippage issue affects accuracy of the delay time. How does such question solve?

About the SysTick priority explanation, has not explained in FreeRTOS tutorial Cortex-M3 edition , where can I get information about the SysTick interrupt explanation?

Regards.


Interrupt arriving at the same time

Posted by jj1010 on October 14, 2014

By the way, what does Regards mean? my mother tongue is not English. Thanks!


Interrupt arriving at the same time

Posted by rtel on October 14, 2014

Other tasks want a definite time delay,

The accuracy of any delay period can be specified with a granularity of 1 tick period. That is because the next tick interrupt that occurs after requesting the delay is taken as the first tick of the delay. So, if you ask for a delay immediately before a tick interrupt occurs then the first delay period will be a tiny fraction of one tick. Likewise, if you ask for a delay immediately after a tick interrupt occurs the first period of the delay will be one complete tick period.

but the time slippage issue affects accuracy of the delay time. How does such question solve?

As per my previous post - unless you are writing interrupt service routines that take more than one entire tick period to execute (so potentially two ticks occur during the execution of a single interrupt service routine) then there is no time slippage issue. If you interrupt genuinely do take that long then I would suggest drastically re-architecting your system as the goal should be for interrupt to be as short as feasibly possible - the deferred interrupt description in the book text shows you how to do that.

About the SysTick priority explanation, has not explained in FreeRTOS tutorial Cortex-M3 edition , where can I get information about the SysTick interrupt explanation?

I'm not sure exactly what the book says about this, hopefully it is in the code comments.

Regards.


Interrupt arriving at the same time

Posted by rtel on October 14, 2014

As a noun it means "best wishes" (used to express friendliness in greetings).

In formal letters (before the days of email) a sign off would be either "yours sincerely", or "yours truly" (depending on how the letter starts I think). "best regards" being a slightly less formal version. Its a bit old fashioned, and I just abbreviated it to "regards".


Interrupt arriving at the same time

Posted by richard_damon on October 15, 2014

The other point about the slippage, unless the task was the highest priority task, it could be delayed by other tasks, and thus not restart at exactly the "right" time.

And, even if it was the highest task, that other interrupt that delayed the sys tick, would have delayed the task too, even if the systick had been highest priority and switched to it.


Interrupt arriving at the same time

Posted by jj1010 on October 16, 2014

Thank you very much!


Interrupt arriving at the same time

Posted by jj1010 on October 16, 2014

I am so glad that you can help me to sovle the problem.


[ Back to the top ]    [ About FreeRTOS ]    [ Privacy ]    [ Sitemap ]    [ ]


Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

Meet Richard Barry and learn about running FreeRTOS on RISC-V at FOSDEM 2019

Version 10.1.1 of the FreeRTOS kernel is available for immediate download. MIT licensed.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


Careers

FreeRTOS and other embedded software careers at AWS.



FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Renesas

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

OpenRTOS and SafeRTOS

Xilinx Microblaze and Zynq partner