# Can this stm32f0 interrupt routine that activates on every byte received be fast enough for 6Mbps?

I am using the STM32F0 discovery board. I am looking at this tutorial on UART with the STM32F0. http://letanphuc.net/2015/09/stm32f0-uart-tutorial-5/

//variables need to be declared at the beginning
char Rx_indx, Rx_data[2], Rx_Buffer[100], Transfer_cplt;

//Interrupt callback routine
void HAL_UART_RxCpltCallback(UART_HandleTypeDef *huart)
{
uint8_t i;
if (huart->Instance == USART1)  //current UART
{
if (Rx_indx==0) {for (i=0;i<100;i++) Rx_Buffer[i]=0;}   //clear Rx_Buffer before receiving new data

if (Rx_data[0]!=13) //if received data different from ascii 13 (enter)
{
}
else            //if received data = 13
{
Rx_indx=0;
}

}

}


The interrupt routine activates on receiving a single byte on UART. I am not sure if it can support 6Mbps as mentioned in the datasheet. If not, can it support up to at least 115kbps? How can one make the code support up to 6Mbps?

• Use MxCube and see that 6M is just a dream. – Marko Buršič May 11 '16 at 7:56
• Do you mean 6Mbps is not possible? The datasheet is incorrect? – user768421 May 11 '16 at 8:02
• Sorry for that, indeed I've cheked mxcube you have the possibility to set max. speed 6M. But you can't evaluate the buffer in that way on that speed. – Marko Buršič May 11 '16 at 8:14
• How should the code be changed to support 6Mbps? – user768421 May 11 '16 at 8:16