_task_create showing unpredictable behavior

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

_task_create showing unpredictable behavior

761 Views
kishu306
Contributor I

Hello,

   I am using MK61 ( 1 MB flash) micro-controller for my application. 

   I am creating a Main Task , which creates other application tasks.

   There are 8 tasks created other than my Main task. 

   When the 8th (final task) is created, the Main task is getting killed.

   This was confirmed by calling the OS Call "task_get_id_from_name()" from one of the running tasksIt shows '0'.

   Can you give some suggestions to see what exactly may be the problem.

0 Kudos
5 Replies

581 Views
danielchen
NXP TechSupport
NXP TechSupport

HI kishore

Just as Mark said,  I would suggest you check the stack size.

MQX can support more than 8 tasks. could you attach your code here, so I can reproduce your issue on my side?

Or you can submit a ticket , attached your project  to NXP technical support.

https://community.nxp.com/docs/DOC-329745 

Regards

Daniel

0 Kudos

581 Views
mjbcswitzerland
Specialist V

Hi

Check task stack sizes to be adequate since this is a critical issue with such operating systems (they can corrupt each other if one is too small).

Regards

Mark

0 Kudos

581 Views
kishu306
Contributor I

Hello Mark,

   

   Thanks for the reply.

   I have increased the stack size to 5 times but no effect.

   I am listing few scenarios which i tested. This may help you to understand the issue more.

   1. Only the 8th task ( Task 'X') gives such problem.

   2. The issue still remains even after the order of task creation is rearranged.

   3. The Task id for Task 'X' is displayed and its non-zero.

   4.  The task template structure is in properly created as mentioned in MQX User guide.

   5.   The issue was seen even after the Task 'X' is only created. ( No other tasks are created)

   Regards,

   Kishore.

0 Kudos

581 Views
mjbcswitzerland
Specialist V

Hi Kishore

I don't use MQX (and NXP no longer supports it) so you may need to contact the manufacturer for such problems.

Regards

Mark

uTasker developer and supporter (+5'000 hours experience on +60 Kinetis derivatives in +80 product developments)
Kinetis: http://www.utasker.com/kinetis.html (including FreeRTOS integration and support)

0 Kudos

581 Views
kishu306
Contributor I

Hello Mark,

   I see at the NXP Webpage with a column on MQX Support. Pasting the pic for your reference.

pastedImage_1.png

   Please confirm .

0 Kudos