What is Diag mode plz help

What is Diag mode plz help
i conect phone diag mod ok but
i factory reset and write imei but always ask
conect diag mod

Using Custom port…
Detected: SPRD U2S Diag (COM45)
Diag mode ok.
Error untill swithing to diag.
Done.