Can you post a small section of code where these calls are made? Maybe you are in a critical section when calling the functions?
If you post some code please use the codify text tags so the formatting does not get all screwy.
static portTASK_FUNCTION( vMenuTask, pvParameters )
{
portTickType xLastPollTime;
/* The parameters are not used. */
( void ) pvParameters;
xLastPollTime = xTaskGetTickCount();
while(1)
{
vTaskDelayUntil( &xLastPollTime, 1 / portTICK_RATE_MS ); //alle 1 ms
if(uiTrigger ==1)
{
Ack(C_BUSY); //SIPLUG in Messung
}
else
{
Menu();//Charakerter empfangen ? -> verarbeiten
}
}
}
void Menu(void)
{
//do something else...
switch (c)
{
/* Uhrzeit setzen */
case 'u':
{
Time.Weekday = status.datetime.Weekday;
Time.Year = status.datetime.Year;
Time.Month = status.datetime.Month;
Time.Date = status.datetime.Date;
Time.Hour = status.datetime.Hour;
Time.Minute = status.datetime.Minute;
Time.Second = status.datetime.Second;
vTaskSuspendAll();
if(Parameter2(&Time,sizeof(Time))!=0) break;
du[0] =BCDToInt(Time.Weekday);
du[1] =BCDToInt16(Time.Year);
du[2] =BCDToInt(Time.Month);
du[3] =BCDToInt(Time.Date);
du[4] =BCDToInt(Time.Hour);
du[5] =BCDToInt(Time.Minute);
du[6] =BCDToInt(Time.Second);
SetTime(du[4], du[5], du[6]);//clock_calender.h
SetDate(du[3], du[2], du[1]);
if( !xTaskResumeAll() )
{
TaskYIELD ();
}
break;
}
//There are more switch cases...
Thanks
The line:
if(Parameter2(&Time,sizeof(Time))!=0) break;
breaks out of the case statement while the scheduler is still suspended. Calls to vTaskSuspendAll() can nest, so exactly the same number of calls to xTaskResumeAll() must be made as previous calls to vTaskSuspendAll() before the scheduler is resumed. When your problem occurs inspect the value of uxSchedulerSuspended (in tasks.c) and you will probably find that it is not zero.
Regards.