By adopting the proposed changes, the problem is generally solved. The problem will only occur when a heavy serial port usage is in the running program. It is reasonable and it can be overcome by pressing the erase button or clicking upload more times.
Fix the problem of unusable programming port for some Due boards by making the erase time longer. https://forum.arduino.cc/t/cannot-upload-to-arduino-due-except-when-pressing-button-erase/517605
Add some readme information based on https://petervanhoyweghen.wordpress.com/2013/02/25/modifying-the-atmega16u2-firmware-on-the-due/
By adopting the proposed changes, the problem is generally solved. The problem will only occur when a heavy serial port usage is in the running program. It is reasonable and it can be overcome by pressing the erase button or clicking upload more times.