Quality RTOS & Embedded Software

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




Loading

FreeRTOS demo application reseting itself?

Posted by tinchogleria on July 19, 2017

Hi again! I'm trying to run freeRTOS demo application in the Explorer16/32 demo board with PIC24FJ1024GB610 MCU. In other topic I comment a problem related with the task (or set of tasks) named #4 in FreeRTOS demo application. It is failing. But another question came up observing the behavior of it. In this example, there is one task wich only role is to "talk" with the LCD (like a 'gatekeeper task' according to the official comments). This task is initialized from main.c file: ~~~ /* Start the task that will control the LCD. This returns the handle to the queue used to write text out to the task. / xLCDQueue = xStartLCDTask(); ~~~ xStartLCDTask() code is: ~~~ QueueHandle_t xStartLCDTask( void ) { / Create the queue used by the LCD task. Messages for display on the LCD are received via this queue. */ xLCDQueue = xQueueCreate( lcdQUEUE_SIZE, sizeof( xLCDMessage ) );

/* Start the task that will write to the LCD.  The LCD hardware is
initialised from within the task itself so delays can be used. */
xTaskCreate( vLCDTask, "LCD", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY + 1, NULL );

return xLCDQueue;

} ~~~ And the task code is next: ~~~ static void vLCDTask( void *pvParameters ) { xLCDMessage xMessage; unsigned short usRow = 0;

/* Remove compiler warnigns. */
( void ) pvParameters;

/* Initialise the hardware.  This uses delays so must not be called prior
to the scheduler being started. */
prvSetupLCD();

/* Welcome message. */
prvLCDPutString( "www.FreeRTOS.org" );

for( ;; )
{
	/* Wait for a message to arrive that requires displaying. */
	while( xQueueReceive( xLCDQueue, &xMessage, portMAX_DELAY ) != pdPASS );

	/* Clear the current display value. */
	prvLCDClear();

	/* Switch rows each time so we can see that the display is still being
	updated. */
	prvLCDGotoRow( usRow & 0x01 );
	usRow++;
	prvLCDPutString( xMessage.pcMessage );

	/* Delay the requested amount of time to ensure the text just written 
	to the LCD is not overwritten. */
	vTaskDelay( xMessage.xMinDisplayTime );		
}

} ~~~ If I'm not wrong, the code** prvLCDPutString( "www.FreeRTOS.org" );** should run just once, when the vLCDTask is initialized. Instead, I'm watching the message** "www.FreeRTOS.org"** in my LCD display frecuently. So, is the demo application resetting itself? On the other hand, like I mentioned at the beggining, Task #4 is failing and I don't know the cause. Are this two issues related? I apreciate a lot your help.


FreeRTOS demo application reseting itself?

Posted by rtel on July 20, 2017

Is there a watchdog timer resetting the system?


FreeRTOS demo application reseting itself?

Posted by tinchogleria on July 20, 2017

I don't think so. Where WATCHDOG should be configured? What I'm running is the original freeRTOS demo application with minimal changes in the lcd driver. I also disabled a task that was trying to use a serial port that is no longer available (the demo was coded to an older version of the demo board Explorer16).


FreeRTOS demo application reseting itself?

Posted by tinchogleria on July 20, 2017

I searched the entire project for the term "watchdog" and "dog" and no results were found.


FreeRTOS demo application reseting itself?

Posted by rtel on July 20, 2017

The watchdog would be in the hardware, not in the software. I'm pretty sure people have used the part with newer files, or newer IDE versions that don't set fuses to turn the watchdog off, etc.


FreeRTOS demo application reseting itself?

Posted by tinchogleria on July 20, 2017

It's supposed to be turned off, right?


FreeRTOS demo application reseting itself?

Posted by rtel on July 20, 2017

You either need to ensure it is turned off, or periodically reset it. Look in the hardware manual for the device you are using.


[ 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