Goodmorning to all.
I'm developing with FreeRTOS 8.0.2 for uP FreeScale K20
I'm using KDS 2.0.0 for developing firmware and Processor Expert to install FreeRtos. I suppose that is an official version (8.0.2) of FreeRTOS and not modified. I have not directly downloaded form this site but it was generated from ProcesorExpert
I'm using "Cross ARM GCC" compiler, I not see the version
I read the guide for arm-cortex-M4 about priority and I have this problem... But I can't resolve it, or understand perfectly the problem.
I have several task, the problem origin when I use 2 task; the first is used for manage external device (and speach to ModBus task for low level communication) and the second is used for manage the internal ADC of uP.
I have 2 interrupt for the 2 ADC-Conv inside the uP. After some conversion, inside TIMER interrupt (not ADC interupt but timer interrupt) I do a xQueuePutFromISR that that awake ADC tast (that is waiting in xQueueReceive )
The task for manage external device communicate via ModBus task via some semaphoreGive and some queue.
If I enable All two task, after a deterministic number of iteration, I see my code stuck in void vListInsert( Listt * const pxList, ListItemt * const pxNewListItem ) where there is an explanation that say:
1) Stack overflow -
2) Incorrect interrupt priority assignment, especially on Cortex-M
parts where numerically high priority values denote low actual
interrupt priorities, which can seem counter intuitive. See
http://www.freertos.org/RTOS-Cortex-M3-M4.html and the definition
of configMAXSYSCALLINTERRUPT_PRIORITY on
3) Calling an API function from within a critical section or when
the scheduler is suspended, or calling an API function that does
not end in "FromISR" from an interrupt.
4) Using a queue or semaphore before it has been initialised or
before the scheduler has been started (are interrupts firing
before vTaskStartScheduler() has been called?).
I try to do:
-check StackOverflow: I have enabled stackoverflowhook via FreeRtos but seems do not enter here my code...
- Priority: I modify some interrupt priority and task priority. Modifing them I see change in duration time of my code before it stuck but never resolved my problem
Due my code execute very well many times before it stuck I exclude the 3 and 4 case...
i suppose that there is something wrong with priority: and I read the literature about it but i can't resolve my problem (maybe I do not understand very well...)
What I can do?
I'm using KDS 2.0.0 for developing firmware and Processor Expert to install FreeRtos
Which compiler are you using? Are you using an official FreeRTOS version, be it from the FreeRTOS download or obtained from another source?
I read the guide for arm-cortex-M4 about priority and I have this problem...
But I can't resolve it, or understand perfectly the problem.
I can assure you you are not the only person to be confused by the interrupt priority mechanisms on the Cortex-M.
Do you have configASSERT() defined? If not please define it and it may show you where the problem is right away. http://www.freertos.org/a00110.html#configASSERT
Goodmorning, many thanks for you answer.
I have dited first topic for adding the information required.
I cann tell you that:
-I suppose that is an official version (8.0.2) of FreeRTOS and not modified. I have not directly downloaded form this site but it was generated from ProcesorExpert
- for problem on interrupt.. yes I see that there are many person that are very very very confused! :-( I do not know if priority is linked to priority of task or interrupt priority.
I supposte that there is a problem if I use maxsyscall of a number less then priority of one interrupt that I use with xMessagePutFromISR (or more than, because priority are in reverse ordeer...)
- configASSERT I suppose I use that, because sometime my code stuck here and it is verey simple understand problem! (in this case, no one of configASSERT was reach...)
What I can do?
Many thanks for answer!
edit: I'm using internal "cross arm GCC" compiler (gived with KDS