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] [October 2015 Threads] Tickless Idle and Software Timer IssuePosted by tarun-patel on October 5, 2015 I am using FreeRTOS 8.2.2. Same issue is present in FreeRTOS 8.2.1 as well.
Please find my project scenario below.
I am using Tickles Idle mode for extra power saving.
I have two tasks.
Task A creates a software timer (autoreload) using xTimerCreate call. This timer will expire at every 100 tick and call it callback function.
Task B will be called at every 2000 tick as I blocked it by vTaskDelay function.
Now, I am expecting controlller will be wakeup from Tickless Idle mode at every 100 tick and do its job.
However, as per my practical expriement, I am getting 100 tick xExpectedIdleTime most of the time. However, some times I am getting 2000 tick xExpectedIdleTime instead of 100 tick.
What will be the reason behind this?
Thanks,
Tarun
Tickless Idle and Software Timer IssuePosted by rtel on October 5, 2015 If the timer is auto reload then I would not expect a 2000 tick delay - could you please create an example project that demonstrates this behaviour and send it to me a r [dot] barry at FreeRTOS [dot] org. Make the project as small as possible so it doesn't do anything else other than demonstrate this behaviour.
Also - which chip and compiler are you using, and are you using a tickless idle implementation provided by ourselves or one that you provided yourself. Finally, is the priority of the timer task set to (configMAX_PRIORITIES - 1)? If not, what is it set to?
Regards.
Tickless Idle and Software Timer IssuePosted by tarun-patel on October 5, 2015 Thanks for prompt response.
Yes timer is auto reload and that's why I am getting 100 tick xExpectedIdleTime most of the time. I will create a demo project and email you by tomorrow.
I am using Toshiba's TZ1001 (ARM Cortex M4F) chip and Keil uVision compiler (V5.05 update 2 (build 169)).
We have implemented tickles idle ourselves. I mistakenly taken timer task priotity to configMAXPRIORITIES. I have corrected it to (configMAXPRIORITIES - 1) that however problem is still exist.
Thanks,
Tarun
Tickless Idle and Software Timer IssuePosted by tarun-patel on October 8, 2015 I have prepared a demo project. However, I am not able to reproduce this behaviour in that project. So I derived there is something in my project's energy measurement library which creates this issue.
I have tried loads of workaround. However, when I enabled preemption using configUSE_PREEMPTION macro, the problem is resolved. I don't know why.
Do you have any idea how this be possible? Meanwhile, I am digging my project for the reason.
Thanks,
Tarun
Tickless Idle and Software Timer IssuePosted by rtel on October 8, 2015
I have tried loads of workaround. However, when I enabled preemption
using configUSE_PREEMPTION macro, the problem is resolved. I don't know why.
I don't think you mentioned you weren't using pre-emption before. I
have never tried tickless idle without preemption before.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|