A `qdl read` operation could be used to see if the board is in EDL mode, before starting the actual download and flashing process.