KW38 wireless-uart SDK can't create more then one task

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

KW38 wireless-uart SDK can't create more then one task

2,949 Views
sihanchen
Contributor III

Hello,

      I am working on the KW38 platform and use the wireless-uart example as my code base. I tried to create two tasks in my project, but it seems that only one task can be successfully created and run. I made an example as shown below and then tested it. I found that the priority of the TASK will determine which TASK will always be executed and another TASK will always be broken. I also tried to redefine FSL_OSA_BM_TIMER_CONFIG as FSL_OSA_BM_TIMER_SYSTICK to enable OS Timer and use OSA_TimeDelay(1000) to delay the running task so that another task can work, but it still doesn't work. Did I do something wrong?

Thank you.

sihanchen_0-1631516538159.png

 

 

Labels (2)
Tags (1)
0 Kudos
Reply
6 Replies

1,769 Views
Honken
Contributor I

Hi, 

Did you find any solution to this problem?

0 Kudos
Reply

2,934 Views
nxf56274
NXP Employee
NXP Employee

You need to increase the stack size. It is in the app_preinclude.h.

0 Kudos
Reply

2,929 Views
sihanchen
Contributor III

Hello,

      I can't find the stack size definition in app_preinclude.h (note: KW38 does not have FreeRots). I also referenced the app_preinclude.h of KW36 and found two definitions gMainThreadStackSize_c and gTotalHeapSize_c. But for KW38, only one stack size is defined as gMainThreadStackSize_c. I tried to extend this setting to 2048, but it still fails. Is there a more detailed explanation, Thank you.

0 Kudos
Reply

2,908 Views
nxf56274
NXP Employee
NXP Employee

Hi,

You are using bm example. So it is impossible to create the task. Please use the freertos example. 

Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 days after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
Reply

2,903 Views
sihanchen
Contributor III

Hi, 

      As I mentioned before, the example code of KW38 does not provide FreeRTOS project, Could you please confirm again, Thanks. 

sihanchen_0-1631686130298.png

 

0 Kudos
Reply

2,898 Views
nxf56274
NXP Employee
NXP Employee

nxf56274_0-1631687094737.png

Do you check if you click the 'freertos' when you download the sdk in 'https://mcuxpresso.nxp.com'

nxf56274_1-1631687145606.png

 

 

 

0 Kudos
Reply