AnsweredAssumed Answered

UCOS-III Eventflaggroup vs task vs ISR {Refer https://ez.analog.com/message/253789}

Question asked by Raghupathi_Kokkarakonda on May 6, 2016
Latest reply on Jun 20, 2016 by Raghupathi_Kokkarakonda

Hi,

 

I am using the blackfin 537 DSP processor, I want to use the event flag to indicate that a hardware interrupt is triggered to a task.

 

I am using the OS ucos-III. The question is, can event flag post is called in the hardware ISR() routine.

 

 

 

I gave a a try to create a task which will pend for the event flag and flag will be posted in harware ISR thats SPORT ISR(), it is plain ISR()

 

code follow goes as :

 

The event flag group and task will be get created the main(), In task is created, event is pend, and the interrupt will be enabled and execution control reaches the ISR and post the event flag, the pend task is placed in the ready queue. But the task is not getting the CPU execution control.

 

By the way there are two ISR routines for SPORT TX and RX. The execution control is in any of the one ISR, whenever I paused the debugging. Please let me know solution for this. Thanks a lot well in advance.

 

 

 

EX_INTERRUPT_HANDLER(SPORT1_DMA_RX_ISR)

 

{

 

  OS_ERR  err;

 

  while(!(*pDMA5_IRQ_STATUS & DMA_DONE));

 

  *pDMA5_IRQ_STATUS &= ~DMA_DONE ;

 

  ssync();

 

 

 

  OSFlagPost(&MyEventFlagGrp,

 

  FPGA_DATA_RECEIVED,

 

            (OS_OPT)OS_OPT_POST_FLAG_SET | OS_OPT_POST_NO_SCHED,

 

            &err);

 

  //OSIntExit();

 

}

 

void sc_performScheduler(void *p_arg)

 

{

 

OS_ERR  err;

 

  CPU_TS  ts;

 

  while(1)

 

  {

 

  MyEventFlagGrp.Flags &= ~FPGA_DATA_RECEIVED;

 

  OSFlagPend(&MyEventFlagGrp,

 

  FPGA_DATA_RECEIVED,

 

  (OS_TICK )0,

 

  (OS_OPT)(OS_OPT_PEND_FLAG_SET_ANY),// + OS_OPT_PEND_FLAG_CONSUME + OS_OPT_PEND_BLOCKING),

 

  &ts,

 

  &err);

 

  if(err == OS_ERR_NONE)

 

  {

 

  /Call a function/

 

  }

 

  }

 

}

 

 

________________________________

 

DISCLAIMER:

 

This email message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. Check all attachments for viruses before opening them. All views or opinions presented in this e-mail are those of the author and may not reflect the opinion of Cyient or those of our affiliates.

 

Outcomes