Hello ,
You can not use 3 different uart Channels for Runtime IO.
- if you want to remove the delay, You should increase the STACK SIZE
- If you want to interact with 3 uart Channels , i advice you to use a RTOS (Chibios or FreeRTOS) with 3 differents threads matching with 3 UARTs
we have already performed this task on Chibios with 2 UARTs
just a note, sd_lld_read is a blocking function
/**
* @brief Low level serial driver read
*
* @param[in] sdp pointer to a @p SerialDriver object
* @param[out] buffer data buffer receiver
* @param[out] len number of bytes received
*
* @return The number of bytes effectively read.
*
* @api
*/
uint16_t sd_lld_read(SerialDriver* sdp, uint8_t* buffer, uint16_t len) {
uint16_t ret;
/* If the interrupts are disabled, reception is not possible otherwise the
execution should be blocked till all bytes are received.*/
if(irqGetExtIntEnable() == 0U) {
ret = 0U;
} else {
if(sdp->config->api_mode != SPC5_LIN_API_MODE_BUFFERED_IO) {
SPC5_LIN_RX_IN_PROGRESS(sdp);
}
/* Check if DMA is enabled.*/
#if (SPC5_SERIAL_DMA_MODE == SPC5_SERIAL_DMA_ON)
/* Check if the LinFlex support DMA.*/
if ((sdp->dma_supported == TRUE) && (sdp->config->dma_enable == TRUE)) {
ret = sd_rx_dma(sdp, buffer, len);
} else {
ret = sd_rx(sdp, buffer, len);
}
#else
ret = sd_rx(sdp, buffer, len);
#endif
if(sdp->config->api_mode != SPC5_LIN_API_MODE_BUFFERED_IO) {
SPC5_LIN_WAIT_FOR_RX_COMPLETION(sdp);
}
}
return ret;
}
check this application
SPC56ECxx_RLA Crypto Test Application
Best Regards
Erwan
In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question.