FreeRTOS task not run when interrupt timer active on STM32F4 Discovery

Hi, I want to combine the interrupt timer on STM32F4 Discovery with FreeRTOS task. But unfortunatelly the task is not executed, but when I disable my interrupt timer the task is works well. Does anyone know why this is happend? Regards Rama

FreeRTOS task not run when interrupt timer active on STM32F4 Discovery

Would you mind to show some of the source code? Both of the “interrupt timer”, as well as the task that doesn’t run

FreeRTOS task not run when interrupt timer active on STM32F4 Discovery

Hi there, here is the code for my Interrupt Timer ~~~ void TIM2Config(){ TIMTimeBaseInitTypeDef TIMTimeBaseStructure; RCCPCLK1Config(RCCHCLKDiv16); RCCAPB1PeriphClockCmd(RCCAPB1PeriphTIM2,ENABLE); TIMTimeBaseStructure.TIMPrescaler = 42000-1; TIMTimeBaseStructure.TIMCounterMode = TIMCounterModeUp; TIMTimeBaseStructure.TIMPeriod = 200-1; TIMTimeBaseStructure.TIMClockDivision = TIMCKDDIV1; TIMTimeBaseStructure.TIMRepetitionCounter = 0; TIMTimeBaseInit(TIM2,&TIMTimeBaseStructure); TIMCmd(TIM2,ENABLE); } void TIMITEnable(){ TIMITConfig(TIM2,TIMITUpdate, ENABLE); } void NVICConfig(){ NVICInitTypeDef NVICInitStrurture; NVICPriorityGroupConfig(NVICPriorityGroup0); NVICInitStrurture.NVICIRQChannel = TIM2IRQn; NVICInitStrurture.NVICIRQChannelPreemptionPriority = 0x00; NVICInitStrurture.NVICIRQChannelSubPriority = 0x00; NVICInitStrurture.NVICIRQChannelCmd =ENABLE; NVICInit(&NVICInitStrurture); } int nInterrupt=0,counter; char buffer[32]; char buftmp[32]; void TIM2IRQHandler(){ if(TIMGetITStatus(TIM2,TIMITUpdate)!=RESET){ TIMClearITPendingBit(TIM2,TIMITUpdate); //counter=TIMGetCounter(TIM6); nInterrupt++; //sprintf(buffer,”rke-%3dn”,nInterrupt); //USARTputs(buffer); sprintf(buftmp,”%dn”,tmp); USARTputs(buf_tmp); tamp = 0; } } ~~~ And I have 2 Task, 1 task for simple print and 1 task for networking (using LwIP) ~~~ void testprint(void) { TickTypet waketime,tamp1,tamp2; const uint32t period = 100; char buff[32];
wake_time = xTaskGetTickCount();
while(1)
{
    USART_puts("aaaaaaaaaaa ");
    //vTaskDelay(1000);
    delay_dw(500);

    tamp2 = xTaskGetTickCount();
    sprintf(buff,"Tick2 = %un",tamp2);

    USART_puts(buff);
    vTaskDelayUntil(&wake_time,period);
}
} void echotcp() { int c1,c2; char clock[32]; tamp = 0; while(1) { if(ETHCheckFrameReceived()) { cyclestart(); c1 = getCycles(); LwIPPktHandle();
c2 = getCycles(); cycle
stop();
            tamp+= c2 - c1;
            GPIO_SetBits(GPIOD,GPIO_Pin_12);
        }
        else
        {
            GPIO_ResetBits(GPIOD,GPIO_Pin_12);
            LwIP_Periodic_Handle(LocalTime);
        }
}
} ~~~