Hi Dialog support team,
In dsps-v_5.150.2 example, macro named as RX_CALLBACK_SIZE was defined as 8. It means after every 8 byte of data received from UART , UART RX ISR loop(void uart_sps_rcv_data_avail_isr(void)) is stopping to receive bytes and calling the callback function below.
My understanding is correct or not? If my understanding is correct, when more than 8bytes are going to be received at a time,then it will miss the remaining bytes or not. Please give some explanation for this?
if(rcv_bytes)
{
void (*rx_callback) (uint8_t, uint32_t);
// Reset RX parameters
uart_sps_env.rx.bufptr = NULL;
// Retrieve callback pointer
rx_callback = uart_sps_env.rx.callback;
if(rx_callback != NULL)
{
// Clear callback pointer
uart_sps_env.rx.callback = NULL;
// Call handler
rx_callback(SPI_STATUS_OK, rcv_bytes);
}
else
{
ASSERT_ERR(0);
}
}
Hi RatheeshT,
遵循configurati RX_CALLBACK_SIZE值on of the UART FIFO, that means that the device will trigger an interrupt when the FIFO of the UART reaches the amount of 8 characters, and thats why the allocation of the buffer follows the RX_CALLBACK_SIZE, the flow of the receiving bytes is stopped by the h/w itself and not via code (as long as you keep the original DSPS fw). So yes from a perspective your understanding is correct. Now, because of the reason that you 've mentioned, is why the FIFO of the UART is configured to operate at half the UART FIFO, so when the external device sends more than 8 bytes, the extra data that the external device will send (in case it misses the flow off) will be stored in the FIFO and will not be missed.
Thanks MT_dialog