I am currently using the FreeRTOS in a project using a PIC32MX. It all
worked properly until I added an xTaskCreate from inside an interrupt
routine. The system crashed!.
The created task started with an xTaskDelay and although it reached this
function it never returned but failed on an address problem.
/* Task started. */
static void downloadtask( void *param )
uint8t schar = 0;
vTaskDelay( DOWNLOADDELAYTO_START );
fileClean( 1 );
I WILL find a way round my problem but it would be interesting to know
if there is a known problem.
Technical Manager (R&D)
Berks RG7 8TA
This email has been checked for viruses by AVG.
There is a simple rule of thumb (which doesn't hold in all cases, but is
easy to state and follow): Do not call any API function that doesn't
end if 'FromISR' from an interrupt.
That is particularly true of xTaskCreate(), which will allocate memory.
If you want to create a task from an interrupt then use one of the
deferred interrupt handling techniques, or use
I would recommend reading the book, its free, and won't take long:
My problem was using the taskENTERCRITICAL/taskEXITCRITICAL inside an interrupt.
I noted your comments and changed to starting the task then suspended it. Whan I wanted to use it I just did an xTaskResumeFromISR to activate it.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.