Closed XFer012 closed 8 months ago
WTF I left a long reply here weeks ago!
What jumps out to me about that log is a huge number of random failures. My diagnosis is this: The connection is unreliable, suffering from frequent errors. Look at the signal on a scope, trigger on whichever edge you like, single trigger mode, and during a transfer, start pressing that button to reset the trigger until you capture data. Adjust horizontal scale so you can see 16-24 bits or so on the screen. Repeat the attempt and press the retrigger button repeatedly. You are looking for a snapshot where you can see both devices talking ("how the hell will I know that?!") Simple - they will have different LOW (and possibly slightly different HIGHs) logic levels - a few tenths of a volt difference. Sometimes the waveform will have a different shape. and the waveform will have a different shape. Most often in seemingly correctly made programmers that don't work it's either something stupid like a broken connection (I have had three diodes fail mechanically on these programmers. I now encase them in hotglue or UV resin, or I was doing that until I got my new dual port adapters that have a UPDI mode built in.,
I thought I responded to that, yes it's having some success communicating with the target, but look at all those times the operation failed and it recovered. Wiring issue, possibly due to differences in parameters of the adapter like series resistors (common on CH340, less common elsewhere).
Set digital scope to trigger on either edge and keep pressing the button while uploading. Since log shows two way communication, that's what we expect to see, and keep pressing the button until you get both sides sending data on the same screen. You will know when you can see both sides transmitting, because when each of them drive the line low, they drive it low with drivers of varying strength. Make sure that these voltages on both ends unambiguous to the parts on both sides. The varying values of series resistors added and on serial adapter, make sure the rise time is decent and the shape of the waveform looks reasonable, that kind of thing.
the selected serial port does not exist or your board is not connected
comes from the Arduino IDE, and appears to be the response to any error code returned by an upload tool. You can see how there was text in the middle of it - I'm not quite sure how that mess of a system managed that.
Let's see, first of all I want to retry with a different USB-Serial adapter (I should have a CH340 besides this CP2104). Then I will try on a different PC. Testing with a 'scope it's going to be tricky (my scope sits in a different room), I'll see what I can do.
Well, now I am really at a loss.
I had to replace my PC (too slow for upcoming stuff) and now with my new PC (same Windows 10 Pro, same Arduino IDE 1.8.19, newer DxCore 1.5.11) everything works both with the FT232RL-based USB-Serial adapter and the CP210x-based adapter.
Any chance of a UPDI-related fix between 1.5.8 and 1.5.11?
From 1.5.9 changelog:
Bugfixes, several, for SerialUPDI, and improvements in error messages.
Discussed in https://github.com/SpenceKonde/DxCore/discussions/463