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

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) 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