AnsweredAssumed Answered

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

Question asked by Bjorn Hammarberg on Feb 24, 2015
Latest reply on May 13, 2015 by Adrian Rockall

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 */



  /*! Task1 Auto initialization start */


  /*! Task1 Auto initialization end */                      

  /*! gpio1 Auto initialization start */


  /*! gpio1 Auto initialization end */