Hello,
I am Working on stm32 with 64k RAM.
when I am running the display blink progam which is provided in freeRTOS 9.0.0 library.
one Single task called vSqrtTask alonely its printing 4018 milli seconds.
when i added another task vCube1LoopTask with vSqrtTask the time in milli seconds get delayed and gave 8048 milli seconds.
when i add more tasks that time getting delayed.
i have made changes in the library with #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 120 ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 40 * 1024 ) )
these values.
i should get the same values from vSqrtTask when I add the more number of tasks also
what is the problem behind it?
how can i manage the heap memory perfectly?
Sorry, I’m not sure of the connection between execution times and heap
memory.
i should get the same values from vSqrtTask when I add the more number
of tasks also
That would depend at the priorities at which the tasks are running. If
the newly added task is preventing the vSqrtTask from running then
vSqrtTask will get less CPU time and therefore take longer to run.
Would need have more information, such as the structure of the tasks,
what the tasks are doing, and what the task priorities are relative to
each other.
Actually my application is to run TFT_LCD display task, read the data coming from the RF and display the data coming from rf on the lcd screen.
when I am running the only display task its working perfectly, as a normal loop function without delay.After that when i add the RF task (2nd Task) the display getting slow. in the both tasks im not using any delay functions.
What does this mean? Are you saying it takes 4 seconds to execute?
–yes
What does this mean? Are you saying if you add the vCube1LoopTask the
amount of time the vSqrtTask takes to execute is doubled?
–yes delay increased
i kept task priorities to all are same priority.
i tried that with different priorities also higher priority task only running all other not running.
after that i used with semaphores also. with this semaphores one after another task is running then what is the use of it? The normal loop also does the same right?
please check out that library which i povided and help me out to run simultaneous tasks without any delay.
If the tasks are the same priority then they should both run unless:
configUSE_TIME_SLICING is defined and set to 0. That would prevent
context switch to an equal priority task until the running task blocked.
The running task has locked the scheduler or entered a critical
section. Could that be the case?
Also, what is your configUSE_TICKLESS_IDLE setting? If you have it
defined try setting it to 0 to ensure normal operation in case there is
anything untoward in the tickless idle implementation.
By keeping this configUSE_TIME_SLICING to 0, while one task is in running state other task is going into blocked state. this is not going to work for me.
By keeping this configUSE_TIME_SLICING to 0, while one task is in
running state other task is going into blocked state. this is not going
to work for me.
Do you have configUSE_TIME_SLICING set to 1? It is still not clear from
your answer.