SpenceKonde / megaTinyCore

Arduino core for the tinyAVR 0/1/2-series - Ones's digit 2,4,5,7 (pincount, 8,14,20,24), tens digit 0, 1, or 2 (featureset), preceded by flash in kb. Library maintainers: porting help available!
Other
563 stars 148 forks source link

PlatformIO Write Delay #1108

Closed lsellens closed 5 months ago

lsellens commented 5 months ago

Is it possible to impose the same write delay on PlatformIO that's available for the Arduino IDE? Using a FTDI as a updi 230400 seems to be the max achievable speed yet on the arduino ide I can flash at 921600 with zero issues. I could not find any options available for this but perhaps I just missed something?

[env:ATtiny402] platform = atmelmegaavr board = ATtiny402 framework = arduino upload_protocol = serialupdi upload_speed = 230400 upload_flags = --tool uart --device $BOARD_MCU --uart $UPLOAD_PORT --clk $UPLOAD_SPEED --verify upload_command = pymcuprog write --erase $UPLOAD_FLAGS --filename $SOURCE

lsellens commented 5 months ago

I just found tools/prog.py and using it as a custom command I am able to flash at 921600 I do think that should somehow getting added to platformio since it seems to work much better then flashing with upload_protocol = serialupdi

lsellens commented 5 months ago

on further inspection it looks like even with prog.py its failing to flash at high speeds but falls back to the default low speed.