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

Pic24 automatic Reset

Posted by amarjith on November 8, 2013

Automatic resetting occurs when i add/ create some tasks for example if i add xTaskCreate( vHandlerTask, "Handler", 500, NULL, 1, NULL);

in my program microcontroller will reset automatically

void vHandlerTask( void pvParameters ) { int i; / As per most tasks, this task is implemented within an infinite loop. / for( ;; ) { U1_puts( "Handler task .rn" ); / Use the semaphore to wait for an event. The semaphore was created before the scheduler was started so before this task ran for the first time. The task blocks indefinitely so the function call will only return once the semaphore has been successfully taken (obtained). There is therefore no need to check the function return value. / xSemaphoreTake( xBinarySemaphore, portMAX_DELAY ); / To get here the event must have occurred. Process the event. case processing is simply a matter of printing out a message. */ U1_puts( "Handler task - Processing event.rn" ); } }

Why this happening when adding some tasks?, if i delete or comment this task program will work. Please help

These are my Tasks if i put tasks as shown below "vMT_InitRepman" will execute first , it never enter in to vHandlerTask even its priority is 10.

    xTaskCreate( vMT_InitRepman, "vMT_InitRepman", 500, NULL, 3, &xInitHandle );

    xTaskCreate( vMT_Loging, "vMT_Loging", 500, 5, 1, &xLogingHandle);
    xTaskCreate( vMT_Upload, "vMT_Upload", 500, 20, 1, &xUploadHandle );
    xTaskCreate( vMT_ErrorHandler, "vMT_ErrorHandler", 500, NULL, 2, &xErrorHandle );

    xTaskCreate( vHandlerTask, "Handler", 500, NULL, 10, NULL);

And if put as shown below, microcontroller will reset continuously

     xTaskCreate( vHandlerTask, "Handler", 500, NULL, 10, NULL);
     xTaskCreate( vMT_InitRepman, "vMT_InitRepman", 500, NULL, 3, &xInitHandle );

    xTaskCreate( vMT_Loging, "vMT_Loging", 500, 5, 1, &xLogingHandle);
    xTaskCreate( vMT_Upload, "vMT_Upload", 500, 20, 1, &xUploadHandle );
    xTaskCreate( vMT_ErrorHandler, "vMT_ErrorHandler", 500, NULL, 2, &xErrorHandle );

Pic24 automatic Reset

Posted by richardbarry on November 8, 2013

Try all the usual things first - define configASSERT(), have the malloc failed and stack overflow hooks defined, etc. Then, if still no luck in trapping the error, step through the task in the debugger until the point at which the reset occurs to see what is causing it.

Regards.


[ 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