FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [March 2017 Threads] speedup freertosPosted by mastupristi on March 1, 2017 Hi,
I have an STM32F410 cortex M4 clocked @100MHz. I notify an high priority task from another, with lower priority, using xTaskNotifyGive()/ulTaskNotifyTake().
The firmware is compiled with arm-gcc:
~~~
~$ arm-none-eabi-gcc --version
arm-none-eabi-gcc (GNU Tools for ARM Embedded Processors) 5.4.1 20160609 (release) [ARM/embedded-5-branch revision 237715]
~~~
and I already use -O3 optimization.
Moving a pin I can measure time between notification and task wakeup. It is about 4us.
Is it possible to speed up notification (I think also context switch)?
best regards
Max
speedup freertosPosted by heinbali01 on March 1, 2017 Hi Max
There are many factors influencing this delay between vTaskNotifyGiveFromISR() and ulTaskNotifyTake() .
Compiler optimisation, for GCC, use -Os or -O3. I tend to like -Os ( optimise for size )
Once you're ready debugging, stop using configASSERT() and stop checking the for stack overflows.
Make sure that the task that you are waking-up has the highest priority of all tasks that are runnable at that moment.
Please let us hear
speedup freertosPosted by hs2sf on March 1, 2017 I also tend to use -Os instead of -O3 with GCC. In addition I get pretty good results using link time optimization (LTO) ie. using -flto. At least it saves even more code space which usually also improves runtime performance.
speedup freertosPosted by rtel on March 1, 2017 Stack overflow detection is the feature that takes the most time to execute.
As has already been said, turning off run time stats, asserts, tick
hooks, etc. all help. The context switch itself is not the limiting factor.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|