Quality RTOS & Embedded Software

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




Loading

ISR

Posted by michaeln32 on June 21, 2016

Hi Can you please tell me the next questions :

1.What is System_Tick() interrupt priority in FREE RTOS ?

2.What is the range of Tasks priority in Free RTOS ?

3.What is the range of ISR priority in Free RTOS ?

4.Can in use librery functions in ISR ( for example memset in ISR) ?

Thank You

Michael


ISR

Posted by rtel on June 21, 2016

Which port are you using?


ISR

Posted by michaeln32 on June 22, 2016

FreeRTOS V8.2.1


ISR

Posted by rtel on June 22, 2016

I meant which MCU and compiler are you using FreeRTOS with?


ISR

Posted by michaeln32 on June 22, 2016

I am using MCU STM32F205RC. Compiler: I am using Atollic


ISR

Posted by rtel on June 22, 2016

1.What is System_Tick() interrupt priority in FREE RTOS ?

Search for configKERNELINTERRUPTPRIORITY on this page http://www.freertos.org/RTOS-Cortex-M3-M4.html and other pages on the website.

2.What is the range of Tasks priority in Free RTOS ?

http://www.freertos.org/RTOS-task-priority.html

3.What is the range of ISR priority in Free RTOS ?

That depends on the MCU as not all Cortex-M devices have the same priority ranges. See the link posted in answer to question 1 and the user manual for your STM32.

4.Can in use librery functions in ISR ( for example memset in ISR) ?

That depends on the library function. Juse when writing a bare metal application (with no OS) callilng memset() should be fine, but calling something like malloc() or printf() would be a very bad idea.


ISR

Posted by michaeln32 on June 22, 2016

Thank You !


ISR

Posted by michaeln32 on July 19, 2016

Hi I am using MCU STM32F205RC. Compiler: I am using Atollic FreeRTOS V8.2.1 I have some questions:

  1. Is it possiable that ISR1 is stop running (preempted) by another ISR2 (when ISR2 have higher preority than ISR1) ?
    1. Is it possiable that ISR1 is stop running (preempted) by another ISR2 (when ISR2 have lower preority than ISR1) ?
    2. Is it possiable that ISR1 is stop running (preempted) by another ISR2 (when ISR2 have the same preority than ISR1) ?

Thank You


ISR

Posted by rtel on July 19, 2016

These are questions about the hardware, the answers to which are in the ARM documentation.

An interrupt can itself only be interrupted by another interrupt if that other interrupt has a higher priority.


ISR

Posted by michaeln32 on July 19, 2016

Thanks !

Can you please tell me what is the use of those functions

portSETINTERRUPTMASKFROMISR();

portCLEARINTERRUPTMASKFROMISR();


ISR

Posted by michaeln32 on July 19, 2016

System Tick has higher priorty than ISR's.

Can System Tick preempt ISR's ?

How can I avoid race condition between ISR's ?

Is it by using portSETINTERRUPTMASKFROMISR ?

Thanks


ISR

Posted by edwards3 on July 19, 2016

portSETINTERRUPTMASKFROMISR(); portCLEARINTERRUPTMASKFROMISR();

These are the equivalent of taskENTERCRITICAL() and taskEXITCRITICAL() for us in ISRs and are used to avoid race conditions. You can call taskENTERCRITICALFROMISR() and taskEXITCRITICALFROMISR() too which makes this more obvious. You will find examples of how the functions are used inside the queue.c file.

Can System Tick preempt ISR's ?

System tick is an ISR so I think this has already been answered. Normally the system tick is the lowest priority ISR.


ISR

Posted by michaeln32 on July 21, 2016

I never use the function memcpy in ISR.

But i use in in tasks.

Is it good or is it bad to use critical section with memcpy in tasks ?

For example :

	portENTER_CRITICAL();

	memcpy(&I2, &I1, sizeof(I1_FLSMsrEvnt));

   portEXIT_CRITICAL();

ISR

Posted by rtel on July 21, 2016

memcpy() itself does not need a critical section. The only time you would need a critical section is if the buffer being memcpy'ed to or from could be accessed by another task while the memcpy operation was in progress.

If there are any occasions that you need to use a critical section in an interrupt then use taskENTERCRITICALFROMISR() and taskEXITCRITICALFROMISR() in place of taskENTERCRITICAL() and taskEXITCRITICAL(). See http://www.freertos.org/taskENTERCRITICALFROMISRtaskEXITCRITICALFROMISR.html for information on how to use the _FROMISR() versions.


ISR

Posted by michaeln32 on July 21, 2016

Thank You.

Is a local variable of task remains his value after context switch to another task and back or the local variable of a task reinitilized to his original value ?


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




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

Latest News

FreeRTOS kernel V10 is available for immediate download. Now MIT licensed.


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

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