_mqx_init_task() not completed before user tasks are started - bug?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

_mqx_init_task() not completed before user tasks are started - bug?

ソリューションへジャンプ
1,245件の閲覧回数
björnhammarberg
Contributor II

Creating a PE + MQX project in KDS and one user task results in the user task blocking the init task (because the init task has its priority set to lowest + 1).

The main problem with this is when using auto initialization of e.g. GPIO, the user task cannot use GPIO since it is initialized *after* the user task is created and run (see below).

Should the _bsp_post_init() function be used to signal the user task that it is ok to proceed? This would require *all* user tasks to block until _bsp_post_init() gives clearance to proceed.

Wouldn't it be better if the init task had highest priority assuring it to complete before any other task is started? Isn't the purpose of the init task to *init* the system *before* anything else is run?

void Components_Init(void)

{

    /* Debug console initialization */

    DbgConsole_Init(BOARD_DEBUG_UART_INSTANCE, DEBUG_UART_BAUD, DEBUG_UART_TYPE);

  /*! Task1 Auto initialization start */

  (void)Task1_Init();

  /*! Task1 Auto initialization end */                      

  /*! gpio1 Auto initialization start */

  GPIO_DRV_Init(NULL,gpio1_OutConfig0);

  /*! gpio1 Auto initialization end */

}

タグ(2)
1 解決策
1,007件の閲覧回数
Carlos_Musich
NXP Employee
NXP Employee

Thanks for your comments Bjorn.

I will report this to development team.

Best regards,

Carlos

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
1,008件の閲覧回数
Carlos_Musich
NXP Employee
NXP Employee

Thanks for your comments Bjorn.

I will report this to development team.

Best regards,

Carlos

0 件の賞賛
返信
1,007件の閲覧回数
adyr
Contributor V

This appears to be solved in KDS 3.0 + KSDK 1.2 as it looks like user tasks are now created by the main task along with the other components. The order of the components in the KDS 3.0 Components tree determines the order that components are created, so just make sure that OS_Task components are at the bottom of the tree (drag and drop).

Thank you development team and co.

Adrian.

0 件の賞賛
返信