Skip to content

Commit 66d595e

Browse files
committed
Add delay to ensure proper device release during flash operation
1 parent eb27213 commit 66d595e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/bmlab_toolkit/flashing.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import sys
22
import os
3+
import time
34
import argparse
45
import logging
56
from concurrent.futures import ThreadPoolExecutor, as_completed
@@ -124,6 +125,9 @@ def flash_device_task(serial, ip_addr, fw_file, mcu, programmer_type, log_level)
124125
device_id = ip_addr or serial
125126
return {'device': device_id, 'success': False, 'error': 'Flash operation failed'}
126127

128+
# Small delay to ensure device is properly released
129+
time.sleep(0.5)
130+
127131
device_id = ip_addr or serial
128132
return {'device': device_id, 'success': True, 'error': None}
129133
except Exception as e:

0 commit comments

Comments
 (0)