Quality RTOS & Embedded Software

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


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 ]    [ Privacy ]    [ Sitemap ]    [ ]


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

Latest News

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

Meet Richard Barry and learn about running FreeRTOS on RISC-V at FOSDEM 2019

Version 10.1.1 of the FreeRTOS kernel is available for immediate download. MIT licensed.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


Careers

FreeRTOS and other embedded software careers at AWS.



FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Renesas

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

Xilinx Microblaze and Zynq partner