I am using SPI to read data from ADC with clock frequency 4MHz. Similarly I am using UART with baudrate setting of 4Mbps.
When I am using UART only, the total time it takes for 2 bytes to be transmitted is 5us ( 20bits / 4Mbps = 5us) which is okay.
When I am using SPI only, the total time it takes for 3 bytes to be read is about 7.6us (total cycle time) which is also okay.
But when I am using both SPI and UART, the total time it takes is around 8.5us which is quite strange. In my opinion the total time should be the sum 5+7.6 = 12.6us.
In my program, first I read the ADC via SPI and then transmit data via UART and it is sequential.