Hi found a new information:
It seem that the problem present when I add an UART with ProcessorExpert.
I added the UART 1 RX (PTC3) and TX (PTC4), I generate code and compile and work
I added a component (from components library) of type "fsl_uart", add baudrate 115200 I generate code and compile and BLOCK! Do not work! Stuck on boot.S .... note that i never use any function, I only create the UART1
If I remove "uartCom1:fsl_uart", generate code, compile and... WORK!
I analize the code, the problem is when the driver initialize the UART.
comment/uncomment this instruction:
UART_DRV_Init(FSL_UARTCOM1,&uartCom1_State,&uartCom1_InitConfig0);
the code work and do not work (note: the code stuck ot not stuck in boot.S... UART1 function are not tested, maybe without init UART not work but the code do not stuck un boot.S).
In this procedure the code is:
uart_status_t UART_DRV_Init(uint32_t instance, uart_state_t * uartStatePtr,
const uart_user_config_t * uartUserConfig)
{
assert(uartStatePtr && uartUserConfig);
assert(instance < HW_UART_INSTANCE_COUNT);
uint32_t baseAddr = g_uartBaseAddr[instance];
uint32_t uartSourceClock;
/* Exit if current instance is already initialized. */
if (g_uartStatePtr[instance])
{
return kStatus_UART_Initialized;
}
/* Clear the state structure for this instance. */
memset(uartStatePtr, 0, sizeof(uart_state_t));
/* Save runtime structure pointer.*/
g_uartStatePtr[instance] = uartStatePtr;
/* Un-gate UART module clock */
CLOCK_SYS_EnableUartClock(instance);
/* Initialize UART to a known state. */
UART_HAL_Init(baseAddr);
/* Create Semaphore for txIrq and rxIrq. */
OSA_SemaCreate(&uartStatePtr->txIrqSync, 0);
OSA_SemaCreate(&uartStatePtr->rxIrqSync, 0);
[....] MANY OTHER CODE... [...]
return kStatus_UART_Success;
}
and when execute:
OSA_SemaCreate(&uartStatePtr->txIrqSync, 0);
the code will stuck in boot.S
I check in confg in MQX_KDSK and I not found info aboiut semaphore, I foun LW_semaphore but nothing about normal sempahore.
there is somthing that I must do?
I try to use not MQW and the code work... Problem maybe is when I use both MQX_KDSK and UART1, in initialization there is the problem... I try to move the init code in a task of MQX and the code execute correctly... But anytime I generate code I must move the init code in a task... And i suppose that if I create another component the problem still occours with that init procedure ...
Why? Anyone have some idea?
Many thanks,
MAssimiliano