I think I know the reason but wants to have a good suggestion to solve the issue.
1. I have a timer which starts interval 3ms to 0.3ms (it's for sending a pulse to Motor driver IC, accel and decel)
2. I also receive Uart Rx 1 packet (6 to 7 bytes) every 30 ms (115200 bps)
in this situation, I lost 1 byte in every 40 to 50 packets (which makes checksum error of the packet)
What could solve this issue?
below is what I'm trying to do
1. speed up and down the UART baud rate
2. Motor Timer interval change to longer
3. change calling functions in ISR to inline function (reduce context changing)