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

xTaskNotifyWait hangs all tasks

Posted by ringolds on December 10, 2015

Hi.

I have an issue with xTaskNotifyWait if using xTicksToWait parameter with value different than 0. If I set the time to wait to non 0 value the RTOS gets stuck in vPortEnterCritical (according to what I can see from debuging). However, the issue seems to be more complicated than that. It seems that the problem occurs only when the xTaskNotifyWait is called at a specific time after the vTaskStartScheduler is started.I am using the xTaskNotifyWait with non 0 wait value. However, only in one specific tasks it causes the RTOS to get stuck. Furthermore, I can actually avoid this issue by putting some artificial loop that eats some CPU cycles away before xTaskNotifyWait is called. Meaning: This does work:

~~~~ volatile uint32_t blaa; for (blaa = 0; blaa < 0xFFFFFU; blaa++) {

    }
    for (;;)
    {
        if (pdTRUE == xTaskNotifyWait(0U, UINT32_MAX, &task_notify_value, portMAX_DELAY))

~~~~

This does not work:

~~~~ for (;;) { if (pdTRUE == xTaskNotifyWait(0U, UINT32MAX, &tasknotifyvalue, portMAXDELAY)) ~~~~ I am running FreeRTOS 8.2.0 on Texas Instruments TMS570LS033x

Thanks for any help in advance.


xTaskNotifyWait hangs all tasks

Posted by rtel on December 10, 2015

I think TI distribute their own FreeRTOS version that has MPU support - are you using that? Or the version from the FreeRTOS download without MPU support?


xTaskNotifyWait hangs all tasks

Posted by ringolds on December 10, 2015

We are using a "hybrid" of both since TI does not have FreeRTOS version for the specific MCU model and their RTOS versions are fairly outdated. This is the first time when we have run into such problem.


xTaskNotifyWait hangs all tasks

Posted by rtel on December 10, 2015

Its difficult to support code that is created by a third party - but in general terms, I cannot think of any reason for the symptom you are reporting - and have not heard of it before.

Task notifications are a relatively new feature, so is it possible they have not added MPU support for them?


xTaskNotifyWait hangs all tasks

Posted by ringolds on December 10, 2015

The behaviour seems really weird taking into account that it works in some places and does not work in others. Maybe you might have some rough guess what might be causing the issue or how we could try to track it down?


xTaskNotifyWait hangs all tasks

Posted by ringolds on December 11, 2015

Managed to fix this myself. Just FYI if someone runs into a similar problem: We were using older version of portASM and how portENTERCRITICAL() is used. chaging portENTERCRITICAL and portDISABLE_INTERRUPTS to map into SWIs in the new portASM file did the trick. TI seems to have updated their HALCoGen files :)


[ 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