This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Compiler/TM4C1294NCPDT: TIRTOS + CCS

Part Number: TM4C1294NCPDT

Tool/software: TI C/C++ Compiler

I am new in TIRTOS and ccs

I am sending one message from TASK1 to TASK2 then it is working proprly

1)I use to send Message from Task 1

Queue_put(xApplTimer_Queue, &(st_Appl_timer[EN_INPUT_CHANNEL_0].elem));
2) Then I use in Task 2

if(! Queue_empty(xAppl_Queue))
{
int temp = 1;
st_Appl_pt = Queue_get(xAppl_Queue);
// st_Appl_pt = Queue_dequeue(xAppl_Queue);
temp = st_Appl_pt->appl_control;

}

But I want to send message from Timer 3a ISR with 50 ms intrrupt

but My application crash in TASK 2 while reciving

In ROV it displays HW exception

Please guide us how to send queue message from ISR.

Regards,

Anushka

  • Hi Anushka,

    1. Where is st_Appl_timer[EN_INPUT_CHANNEL_0].elem? Is it a global? Queue_put does not copy the elem. So if it is a local variable on the stack, it might get overwriting.

    2. You should just do Queue_get (and not check to see if it empty). If the returned elem is equal to the Queue handle (e.g. xAppl_Queue), the queue is empty. If it is not equal to the Queue_Handle, it is a valid elem. This approach is faster and gets rid of the small race condition you have.

    Todd

  • Thank you Todd

    My st_Appl_timer[EN_INPUT_CHANNEL_0].elem is local

    I make it global and problem is solved