Sometimes the serial port losts some incoming characters.
To solve this problem enable inside the Device Tree file DMA for the serial port you are using.
usart0: serial@f801c000 {
pinctrl-0 = <&pinctrl_usart0 &pinctrl_usart0_rts &pinctrl_usart0_cts>;
status = "okay";
atmel,use-dma-rx;
atmel,use-dma-tx;
dmas = <&dma0 2 0x3>,
<&dma0 2 0x204>;
dma-names = "tx", "rx";
};
usart1: serial@f8020000 {
pinctrl-0 = <&pinctrl_usart1 &pinctrl_usart1_rts &pinctrl_usart1_cts>;
status = "okay";
atmel,use-dma-rx;
atmel,use-dma-tx;
dmas = <&dma0 2 0x5>,
<&dma0 2 0x206>;
dma-names = "tx", "rx";
};
To compile know how to compile the Device Tree follow the tutorial on the Kernel Compilation listed in the Tutorial Index.