microchip-pic-avr-tools / pymcuprog

a Python utility for programming various Microchip MCU devices using Microchip CMSIS-DAP based debuggers
MIT License
96 stars 22 forks source link

Feature request: ability to set serial timeout when using serial UPDI #28

Closed jzplusplus closed 1 year ago

jzplusplus commented 1 year ago

Hi, I am using pymcuprog to program a chip as soon as it is connected by running in a loop. The default timeout passed to pyserial in the "physical.py" file is 1 second. This leads to each failed programming attempt spending several seconds waiting and makes the program very slow to begin programming once the chip is actually present. A parameter passed to ToolSerialConnection would solve this problem. (I have tested setting the timeout to 0.1 and have not encountered any issues)

xedbg commented 1 year ago

Logged internally as DSG-5158

xedbg commented 1 year ago

@jzplusplus - if you want to give it a try: pip install -i https://test.pypi.org/simple/ pymcuprog==3.13.12.4

xedbg commented 1 year ago

This feature was added in 3.14 release. Default behaviour is unchanged (although could probably have been reduced for the benefit of all...)