Applcation Task not getting invoked by micro c OS after posting the message to the queue

cancel
Showing results for 
Search instead for 
Did you mean: 

Applcation Task not getting invoked by micro c OS after posting the message to the queue

51 Views
NXP Employee
NXP Employee
Content originally posted in LPCWare by ramakrishna.boyina on Thu Nov 21 05:23:46 MST 2013
Hi All,

I am using Keil MCB 1800 eval board (LPC1857) with micro C OS and  IAR tool chain.

My application using two UARTS, one UART (UART0) for debug messages and another UART (UART3) for interfacing to other hardware.
My application has one sec periodic timer, two OS tasks (one task for timer and another task for UART messages), and UART3 ISR.

Uart Task will wait for message queue (by calling OSQPend).
After receiving message from UART, I am posting message to message queue. The task is executed and processed the message. After processing message, again i am waiting for message (by calling OSQPend)

THis is my sequence of flow. The application is working for couple of hours (1-4 hours). After that UART task not getting executed at all.
But i am receiving message from UART and getting posting error as OS_ERR_Q_MAX after 10 messages posted.

COuld you tell what could be the reason why task is not getting called.

thanks & Regards
ramakrishna.

Labels (1)
0 Kudos
2 Replies

6 Views
NXP Employee
NXP Employee
Content originally posted in LPCWare by ramakrishna.boyina on Thu Nov 21 22:29:54 MST 2013
Hi,

Thank for your reply.

I am posting message from UART ISR to UART task. Before posting message by ISR, the task is in waiting state (waiting for message). After posting message by UART IST (OSQPost), the UART task is not getting called.

This issue is coming after running couple of hours.

I have tried by incresing/decreasing queue size but result is same.

thanks & regards,
ramakrishna.
0 Kudos

6 Views
NXP Employee
NXP Employee
Content originally posted in LPCWare by mc on Thu Nov 21 06:51:20 MST 2013
Hi ramakrishna,
OS_ERR_Q_MAX  means queue is full and therefore can not accept more message. I am assuming you are using OSQPend and OSQPost. Looks like task doing OSQPost is sending message faster.

Could you please check/do following.
1) Does your UART task has higher priority than the task which is doing OSQPost. If not, make it higher priority and see the result.

2) Increase the size of queue to just see the effect.

3) Reduce the Queue size and see the effect. You should see error faster and this way you can resolve it.


Hope it will help
MC
0 Kudos