Resolved! After UART send the bytes from the buffer, \0 is also received.
Why I get \0 at the end of the transmission?I imaging the \0 is a NUL termination character but I have seen from the terminal that sometimes is not received or arrives with a big delay.Could somebody tell me anything about it?Thanks in advance.