Skip to content

Commit 31c33ca

Browse files
committed
tweak usb reset wait time, fix test script with IAR server
1 parent b343ac6 commit 31c33ca

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

.github/workflows/build_esp.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,9 @@ jobs:
9696
run: |
9797
for port in $(lspci | grep USB | cut -d' ' -f1); do
9898
echo -n "0000:${port}"| sudo tee /sys/bus/pci/drivers/xhci_hcd/unbind;
99-
sleep 1;
99+
sleep 0.5;
100100
echo -n "0000:${port}" | sudo tee /sys/bus/pci/drivers/xhci_hcd/bind;
101-
sleep 1;
101+
sleep 3;
102102
done
103103
104104
- name: Test on actual hardware

.github/workflows/cmake_arm.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,9 @@ jobs:
148148
run: |
149149
for port in $(lspci | grep USB | cut -d' ' -f1); do
150150
echo -n "0000:${port}"| sudo tee /sys/bus/pci/drivers/xhci_hcd/unbind;
151-
sleep 1;
151+
sleep 0.5;
152152
echo -n "0000:${port}" | sudo tee /sys/bus/pci/drivers/xhci_hcd/bind;
153-
sleep 1;
153+
sleep 3;
154154
done
155155
156156
- name: Test on actual hardware

test/hil/hil_test.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,11 @@
3434
import json
3535
import glob
3636

37-
# for RPI double reset: install sudo apt install python3-gpiozero or sudo pip install gpiozero
38-
from gpiozero import LED
37+
# for RPI double reset
38+
try:
39+
import gpiozero
40+
except ImportError:
41+
pass
3942

4043

4144
ENUM_TIMEOUT = 10
@@ -141,7 +144,7 @@ def flash_esptool(board, firmware):
141144

142145
def doublereset_with_rpi_gpio(board):
143146
# Off = 0 = Reset
144-
led = LED(board["flasher_reset_pin"])
147+
led = gpiozero.LED(board["flasher_reset_pin"])
145148

146149
led.off()
147150
time.sleep(0.1)

0 commit comments

Comments
 (0)