AnsweredAssumed Answered

MQX_KSDK_1.0.0 with PE and fsl_uart auto initialization

Question asked by William Koos on Sep 29, 2014
Latest reply on Oct 24, 2014 by Vojtech Filip

I have created a MQX KSDK plus Processor Expert project using MXQ_KSDK_1.0.0 for the FRDM-K64F board following the tutorial MQX with KSDK and Processor Expert. If I add a fsl_uart component it has the "Auto Initialization" checked by default:

Screen Shot 2014-09-29 at 2.54.47 PM.png

This causes a call to UART_DRV_Init() from inside Components_Init() which is called from PE_low_level_init() which is called from main(). This is all done before the call to PEX_RTOS_START() in main(). The problem is that UART_DRV_Init() includes calls to OSA_SemaCreate() before the kernel data structures are initialized and the code crashes. If you uncheck the "Auto Initialization" box then this code sequence is avoided and the remaining code will run. Is there a recommended way of using the fsl_uart component with MQX so that the initialization occurs after MQX is up and running? How then is fsl_uart coupled in to the MQX IO layer?

Outcomes