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

Software time goes AMOK

Posted by https://www.google.com/accounts on March 13, 2013
I'm Using: FreeRTOS 7.3, MplabX 1.7, ICD 3, XC32 V1.2, PIC32MX795F512L, XP SP3.

I'm using software timers to progress through a state machine by sending a message to a queue. I'm starting and stopping the timers at various stages. However, at one point, the timer does not stop when I use the xTimerStop and the period decreases. It never stops. It appears that the something to do with the timer is gone AWOL. I tried using the RTOSViewer but it shows nothing.

There are two tasks running, one has a minimal stack size of 600 and the other 1200 bytes, which is the one running out of control with the timer. The total heap size is 28000.

How can I get to the source of the problem? I have a feeling that something is being corrupted, stack, queue or whatever.

Jastmc







RE: Software time goes AMOK

Posted by https://www.google.com/accounts on March 13, 2013
Additional Info: In the task where the timer is running the uxTaskGetStackHighWaterMark() gives me 0x01DB, which seems like a good enough margin.

Jastmc

RE: Software time goes AMOK

Posted by Richard on March 14, 2013
Jastmc, I had problems with the timers going nuts as well. I believe there is a bug in the timer code in 7.3 and may have been fixed recently. In the meantime, try raising the priority of the timer task above that of your tasks.

RE: Software time goes AMOK

Posted by Richard on March 14, 2013
Travfrog is correct that there was a corner case that could cause issues if the priority of the timer task was at or below the priority of tasks using the timers. That would be the first thing to try - travfrog has already suggested the quick fix and test if the priority of your timer task is indeed below the priority of the tasks using timers (if you want the full fix that would allow you to keep the priorities unchanged then look at timers.c from FreeRTOS V7.4.0).

If that does not fix your problem, or if your timer task is already above the priority of the tasks using the timers, then post back. We will then need a little more information to help diagnose the cause.

Regards.

RE: Software time goes AMOK

Posted by https://www.google.com/accounts on March 14, 2013
Upgrade to 7.4 works perfectly!

Thanks all.
James


[ 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