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

Pb with vTAskResume, vDelay, vDelayUntil

Posted by it'sme Hello on March 13, 2008
Hi,

I am a new user of FreeRTOS and I try to understand how it works. I want to use it with the new PIC32MX360F512L and I test it with MPLAB SIM (MPLAB IDE v8). I created two simple task with differents priorities and I want to delay/suspend the first one, run the second and go back in the first task after the end of the delay or with vTaskResume ( xHandle ).

When I run the programm the first task is delayed or suspended and the second run correctly. Next, when it's time to resume the first task, the second task stops to run (that is normal) the current TCB point on the first task but the programm never go back in this task. Instead of this, the programm loops in the port_asm.S file between portSAVE_CONTEXT and portRESTORE_CONTEXT.

I guess the problem come from portSAVE_CONTEXT, portRESTORE_CONTEXT or vTaskIncrementTick but I am not good enough to see exactly what happens.

Can you explain me what I have to do in order to have the expected behaviour?

Thanks for your help.

PS: Sorry for my english but as you can read, it's not my mother tongue!!

RE: Pb with vTAskResume, vDelay, vDelayUntil

Posted by PICmeup on March 13, 2008
I suspect the problem might be that you are running it in the sim. Can you run it on the mcu. Does the tick interrupt work in the sim?

RE: Pb with vTAskResume, vDelay, vDelayUntil

Posted by it'sme Hello on March 14, 2008
I can't run it on the mcu because I don't have it yet but the tick interrupt seems to work in the sim. When I look the tickcount variable, it increments well. If I want a delay of 20 ticks, the tickcount variable counts from A to A + 20 and after that the current TCB changes and points on the high priority task (the delayed task) but the programm never go in it.


[ 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