2019-07-17 11:00 PM
I am working with 560B54L5 discovery board. I am using runtime IO component with uart test application. I am able to send data at one channel at a time(one channel).
my issues are
If I can not use runtime IO for 3 uart channel than can you please suggest me some alternate for removing the delay component after write function.
status = sd_lld_write(&SD1,command,getStrlen(command));
osalThreadDelayMilliseconds(200);
Thanks
Rewatee
Solved! Go to Solution.
2019-07-18 02:09 AM
Hello ,
You can not use 3 different uart Channels for Runtime IO.
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
2019-07-18 02:09 AM
Hello ,
You can not use 3 different uart Channels for Runtime IO.
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