aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--pyecsca/sca/target/chipwhisperer.py4
-rw-r--r--pyecsca/sca/target/simpleserial.py3
2 files changed, 4 insertions, 3 deletions
diff --git a/pyecsca/sca/target/chipwhisperer.py b/pyecsca/sca/target/chipwhisperer.py
index 49daef3..a479734 100644
--- a/pyecsca/sca/target/chipwhisperer.py
+++ b/pyecsca/sca/target/chipwhisperer.py
@@ -18,7 +18,7 @@ from .simpleserial import SimpleSerialTarget
@public
class ChipWhispererTarget(Flashable, SimpleSerialTarget): # pragma: no cover
- """ChipWhisperer-based target, using the SimpleSerial protocol and communicating using ChipWhisperer-Lite/Pro."""
+ """ChipWhisperer-based target, using the SimpleSerial-ish protocol and communicating using ChipWhisperer-Lite/Pro."""
def __init__(
self, target: SimpleSerial, scope: ScopeTypes, programmer, **kwargs
@@ -29,8 +29,8 @@ class ChipWhispererTarget(Flashable, SimpleSerialTarget): # pragma: no cover
self.programmer = programmer
def connect(self):
- self.target.con(self.scope)
self.target.baud = 115200
+ self.target.con(self.scope, noflush=True)
sleep(0.5)
def flash(self, fw_path: str) -> bool:
diff --git a/pyecsca/sca/target/simpleserial.py b/pyecsca/sca/target/simpleserial.py
index aeb5c5f..edc543e 100644
--- a/pyecsca/sca/target/simpleserial.py
+++ b/pyecsca/sca/target/simpleserial.py
@@ -37,7 +37,7 @@ class SimpleSerialMessage:
@public
class SimpleSerialTarget(SerialTarget, ABC):
- """A SimpleSerial target, sends and receives SimpleSerial messages over a serial link."""
+ """A SimpleSerial-ish target, sends and receives SimpleSerial messages over a serial link."""
def recv_msgs(self, timeout: int) -> Mapping[str, SimpleSerialMessage]:
"""
@@ -48,6 +48,7 @@ class SimpleSerialTarget(SerialTarget, ABC):
"""
start = time_ns() // 1000000
buffer = bytes()
+ # Expect "z00" confirmation response, as in SimpleSerial 1.
while not buffer.endswith(b"z00\n"):
wait = timeout - ((time_ns() // 1000000) - start)
if wait <= 0: