Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem


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 ]    [ Privacy ]    [ Sitemap ]    [ ]


Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

Meet Richard Barry and learn about running FreeRTOS on RISC-V at FOSDEM 2019

Version 10.1.1 of the FreeRTOS kernel is available for immediate download. MIT licensed.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


Careers

FreeRTOS and other embedded software careers at AWS.



FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Renesas

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

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

OpenRTOS and SafeRTOS

Xilinx Microblaze and Zynq partner