Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Real time embedded FreeRTOS mailing list 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT Training




Loading

Porting FreeRTOS to Cypress PSoC

Posted 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 PSoC

Posted 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 PSoC

Posted 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 PSoC

Posted 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.


[ Back to the top ]    [ About FreeRTOS ]    [ Sitemap ]    [ ]




Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.


Free TCP/IP and file system demos for the RTOS


Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists