Skip to content

Commit

Permalink
just lint
Browse files Browse the repository at this point in the history
  • Loading branch information
SpenceKonde committed Jan 17, 2022
1 parent 1ab01a0 commit 9aa1eb1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
### [Check it out, we have "discussions" now!](https://github.com/SpenceKonde/megaTinyCore/discussions)
Let's use that - it's better than gitter ever was, and it's all on one site.

### 2.5.5 is now available. This fixes a number of critical issues with the 2.5.x versions and all users are encouraged to update.
### 2.5.7 is now available
This includes some fixes and enhancements to SerialUPDI, and improves the 2.5.6 changes to Wire by eliminating the use of a ring rather entirely and using a simple linear buffer.

### Notice regarding update issues
Well, I screwed up fairly badly in handling the board manager json. The short version of the story is that I discovered a bug in 2.4.3 that required no changes to the core, just a board manager change. So I changed the json file (big mistake). Anyone who installed after that change would get a java null pointer exception when trying to upgrade. But I didn't realize this until I had already done a release in 2.5.x, then realized I'd missed that fix, and modified the board manager json after release. Then I finally made the connection between having done that and the flood of support inquiries relating to being unable to upgrade.
Expand Down Expand Up @@ -41,12 +42,12 @@ Read the [SerialUPDI documentation](https://github.com/SpenceKonde/AVR-Guidance/
As of 2.3.2, with the dramatic improvements in performance, and the proven reliability of the wiring scheme using a diode instead of a resistor, and in light of the flakiness of the jtag2updi firmware, this is now the recommended programming method. As of this version, programming speed has been increased by as much as a factor of 20, and now far exceeds what was possible with jtag2updi (programming via jtag2updi is roughly comparable in speed to programming via SerialUPDI on the "SLOW" speed option, 57600 baud; the normal 230400 baud version programs about three times faster than the SLOW version or jtag2updi, while the "TURBO" option (runs at 460800 baud and increases upload speed by approximately 50% over the normal one. The TURBO speed version should only be used with devices running at 4.5v or more, as we have to run the UPDI clock faster to keep up (it is also not expected to be compatible with all serial adapters - this is an intentional tradeoff for improved performance), but it allows for upload and verification of a 32kb sketch in 4 seconds.

#### (new in 2.5.6) What's with all the different SerialUPDI options?
Depending on adapter model, and operating sytem, it has been found that different settings are required; however, settings needed to keep even 230400 baud from failing on linux/mac with most adapters impose a much larger penalty on windows, where the OS's serial handling is slow enough that nothing needs that delay...
Depending on adapter model, and operating system, it has been found that different settings are required; however, settings needed to keep even 230400 baud from failing on linux/mac with most adapters impose a much larger penalty on windows, where the OS's serial handling is slow enough that nothing needs that delay...

The "write delay" mentioned here is to allow for the page erase-write command to finish executing; this takes a non-zero time. Depending on the adapter, USB latency and the implicit 2 or 3 byte buffer (it's like a USART, and probably implemented as one internally. The third byte that arrives has nowhere to go, because the hardware buffer is only 2 bytes deep) may be enough to allow it to work without an explicit delay. Or, it may fail partway through and report an "Error with st". The faster the adapter's latency timeout, and the faster the OS's serial handling is, the greater the chance of this being a problem. This is controlled by the `-wd` command line parameter if executing prog.py manually. As of 2.5.6 this write delay is closer to the actual time requested (in ms), previously it had a granularity of several ms, when 1 is all you needed, and as a result, the penalty it imposed was *brutal*, particularly on Windows.

Selection guide:
* 460800+ baud requires the target to be running at 4.5V+ to remain in spec (in practice, it probably doesn't need to be quite that high - but it must be a voltage high enough to be stable at 16 MHz. We set the interface clock to the maximum for all speeds above 230400 baud - while a few adapters sometimes work at 460800 without this step (which in and of itself is strange - 460800 baud is 460800 baud right?), most do not and SerialUPDI doesnt't have a way of determining what the adapter is.
* 460800+ baud requires the target to be running at 4.5V+ to remain in spec (in practice, it probably doesn't need to be quite that high - but it must be a voltage high enough to be stable at 16 MHz. We set the interface clock to the maximum for all speeds above 230400 baud - while a few adapters sometimes work at 460800 without this step (which in and of itself is strange - 460800 baud is 460800 baud right?), most do not and SerialUPDI doesn't have a way of determining what the adapter is.
* CH340-based adapters have high latency on all platforms, and all options work without using the write delay.
* Almost all adapters work on Windows at 230.4k without using the write delay. A rare few do not, including some native USB microcontrollers programmed to act as serial adapters (ex: SAMD11C).
* Almost nothing except the CH340-based adapters will work at 460.8k or more without the write delay, regardless of platform.
Expand Down

0 comments on commit 9aa1eb1

Please sign in to comment.