Or you can change it for all serials in the due ide 1.5.2, and use the Serial.flush() command
go to --> arduino-1.5.2\hardware\arduino\sam\cores\arduino
edit in the USARTClass.CPP ( NOT UARTClass.CPP)!!!!
Use the TXEMPTY flag, and not the TXRDY flag
FROM :
void USARTClass::flush(...