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
Which port are you using?
FreeRTOS V8.2.1
I meant which MCU and compiler are you using FreeRTOS with?
I am using MCU STM32F205RC. Compiler: I am using Atollic
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.
Thank You !
Hi I am using MCU STM32F205RC. Compiler: I am using Atollic FreeRTOS V8.2.1 I have some questions:
Thank You
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.
Thanks !
Can you please tell me what is the use of those functions
portSETINTERRUPTMASKFROMISR();
portCLEARINTERRUPTMASKFROMISR();
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
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.
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();
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.
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 ?