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] [July 2009 Threads] Porting FreeRTOS to Cypress PSoCPosted by Alexandre Tolmos on July 8, 2009 Hello,
I'm trying to port FreeRTOS to the Cypress PSoC architecture and I'm having some problems with the scheduler.
For now I've just tested cooperative scheduling with one task plus the idle task (both have the idle priority.)
When the main task yields using portYield() or vTaskDelay(0), the scheduler alternates between the two tasks correctly. However, when the main task blocks itself using vTaskDelay(x), the scheduler never gives back the processor to the main task.
I checked that the idle task calls portYield() and the tick is incremented by the timer ISR so I don't understand why the main task is never woken.
Any help is appreciated.
Thanks !
RE: Porting FreeRTOS to Cypress PSoCPosted by Richard on July 8, 2009 When using the co-operative scheduler (configUSE_PREEMPTION is set to 0 in FreeRTOSConfig.h) then the tick interrupt just needs to call vTaskIncrementTick() - and as you say your task has to periodically yield.
When using the pre-emptive scheduler the tick interrupt has to call first vTaskIncrementTick() and then second vTaskSwitchContext().
Is this being done?
Regards.
RE: Porting FreeRTOS to Cypress PSoCPosted by Alexandre Tolmos on July 9, 2009 There was a bug in my implementation of vPortYield() which caused the GIE bit in the flags register to be cleared and therefore the tick interrupt was stopped.
Now co-operative scheduling works fine. However, pre-emptive scheduling doesn't work yet. I suspect there is another interrupt related problem.
Thanks.
RE: Porting FreeRTOS to Cypress PSoCPosted by Alexandre Tolmos on July 10, 2009 Hello,
I managed to get pre-emptive scheduling to work with two tasks (plus the idle task) but it only works if both tasks have the tskIDLE_PRIORITY priority.
If I set the priority of one task to a priority higher than the idle priority then both tasks block and never wake up. Each task toggles a LED and then calls vTaskDelay().
configMAX_PRIORITIES is set to 4.
What could be the problem ?
Thanks.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|