AnsweredAssumed Answered

IRQHandler and RTOS

Question asked by siqueira.erisson on May 7, 2012
Latest reply on May 11, 2012 by Clive One
Hi,

I have a problem, because there are sensors signals a lot (at handler).
The signals arrive at the same time, and then, sometimes, the counters
don't stay the same each others, but I am simulating at the same signal.

I would like to know if I can do the Handler interrupt individually
of EXITI 10, 11, 12, 13, 14 and 15 or I have to do as the same below:

/*******************************************************************************
* Function Name  : EXTI15_10_IRQHandler
* Description    : This function handles External lines 15 to 10 interrupt request.
* Input          : None
* Output         : None
* Return         : None
*******************************************************************************/
void EXTI15_10_IRQHandler(void)
{
 /* Sensor 0 - Tratamento de Interrupcao */
 if(EXTI_GetITStatus(EXTI_Line10) != RESET)
 {
  sinal_sensor0++;
  EXTI_ClearITPendingBit(EXTI_Line10); 
 }

 /* Sensor 1 - Tratamento de Interrupcao */
 if(EXTI_GetITStatus(EXTI_Line11) != RESET)
 {
  sinal_sensor1++;
  EXTI_ClearITPendingBit(EXTI_Line11); 
 }

 /* Sensor 2 - Tratamento de Interrupcao */
 if(EXTI_GetITStatus(EXTI_Line12) != RESET)
 {
  sinal_sensor2++;
  EXTI_ClearITPendingBit(EXTI_Line12); 
 }

 /* Sensor 3 - Tratamento de Interrupcao */
 if(EXTI_GetITStatus(EXTI_Line13) != RESET)
 {
  sinal_sensor3++;
  EXTI_ClearITPendingBit(EXTI_Line13); 
 }

 /* Sensor 4 - Tratamento de Interrupcao */ 
 if(EXTI_GetITStatus(EXTI_Line14) != RESET)
 {
  sinal_sensor4++;
  EXTI_ClearITPendingBit(EXTI_Line14); 
 }

 /* Sensor 5 - Tratamento de Interrupcao */ 
 if(EXTI_GetITStatus(EXTI_Line15) != RESET)
 {
  sinal_sensor5++;
  EXTI_ClearITPendingBit(EXTI_Line15); 
 }
}

Thanks

Other Question....
The RTOS can help to solve this problem?????

Attachments

Outcomes