Hi,
We tried to use LinFlexD to output UART charecters with API LINFLEXD_UART_DRV_SendDataBlocking(). It looks we can only use it after OS starts. If we send right after driver inits, it will hang. See the example below. The code will hang at LINFLEXD_UART_DRV_SendDataBlocking() and never get return.
Would you please comment if there's any limitation or rule in this case?
int main(void)
{
CLOCK_SYS_Init(g_clockManConfigsArr, CLOCK_MANAGER_CONFIG_CNT,
g_clockManCallbacksArr, CLOCK_MANAGER_CALLBACK_CNT);
CLOCK_SYS_UpdateConfiguration(0U, CLOCK_MANAGER_POLICY_AGREEMENT);
PINS_DRV_Init(NUM_OF_CONFIGURED_PINS, g_pin_mux_InitConfigArr);
LINFLEXD_UART_DRV_Init(INST_LINFLEXD_UART1, &linflexd_uart1_State, &linflexd_uart1_InitConfig0);
LINFLEXD_UART_DRV_SendDataBlocking(INST_LINFLEXD_UART1, "test", 5, 1000U);
xTaskCreate(xxxx);
vTaskStartScheduler();
Solved! Go to Solution.
Hi,
LINFLEXD_UART_DRV_SendDataBlocking uses FreeRTOS API via OSIF_SemaWait(called to wait until the transfer is complete or timeout is reached). This is the reason why the program hangs when LINFlexD API is called.
SDK drivers that use OSIF must be run after the scheduler is started.
Best regards,
Rares
Hi,
LINFLEXD_UART_DRV_SendDataBlocking uses FreeRTOS API via OSIF_SemaWait(called to wait until the transfer is complete or timeout is reached). This is the reason why the program hangs when LINFlexD API is called.
SDK drivers that use OSIF must be run after the scheduler is started.
Best regards,
Rares