Quality RTOS & Embedded Software

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




Loading

Guidance needed for troubleshooting vTaskDelay() and vTaskDelayUntil() issues

Posted by mdeleo on November 4, 2017

I recently ported FreeRTOS 9.0.0 to the ATmega1284 microcontroller and am noticing some strange behavior when vTaskDelay() or vTaskDelayUntil() is called. The behavior is that both calls, regardless of the delay specified, return at the next tick. Toggling a gpio line and examining with an oscilliscope revealed this.

Some further digging revealed that the call to prvAddCurrentTaskToDelayedList() in tasks.c is failing. By failing I mean that the body of that function isn't being executed. I toggle a gpio line, in vTaskDelayUntil(), right before the call and can see that it's about to be called but move the same gpio toggling into the actual function and the gpio isn't toggled.

Strange, I know.... Unfortunately, my STK500 programming board doesn't have debugging support.

I have both the stack overflow and malloc failed hooks enabled but those aren't getting hit.

Any pointers you can provide would be greatly appreciated,

Thanks in advance,

Mike


Guidance needed for troubleshooting vTaskDelay() and vTaskDelayUntil() issues

Posted by mdeleo on November 5, 2017

Source files

Attachments

FreeRTOSConfig.h (5603 bytes)
main.c (1005 bytes)
port.c (15208 bytes)
portmacro.h (6356 bytes)

Guidance needed for troubleshooting vTaskDelay() and vTaskDelayUntil() issues

Posted by rtel on November 5, 2017

I'm afraid without being able to ask you to step into the functions so you are able to report back what the code is doing all we can do is take guesses. I would recommend investing in a debugger.


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




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

Latest News

FreeRTOS kernel V10 is available for immediate download. Now MIT licensed.


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

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