Skip to content

2.3.2 - Improved serial-updi, and a bunch of bugfixes, 2-series optiboot

Compare
Choose a tag to compare
@SpenceKonde SpenceKonde released this 11 May 15:23
· 1166 commits to master since this release

This is a big release for serial adapters and people who own them - because we've improved the performance of serial-adapter-as-updi by a factor of 8-20 or more! You can now write a full 32k chip in under 5 seconds using just a serial adapter and a resistor (or preferably a schottky diode like a 1N4148). jtag2updi is now a legacy programming tool, we do not recommend using it unless the serial adapter method is for some reason unsuitable (in which case one wonders why jtag2updi would be more suitable, but that's another issue...)
We also introduce the 2-series versions of Optiboot, in case anyone wants to use your serial adapter like that, instead of as a UPDI programmer.....
Keywords.txt now includes all the register names from the datasheet (thanks @MCUdude )
Optiboot users also get the Flash library to write to flash from application (@MCUdude again - this is the version of Flash.h from MegaCoreX and like the version on classic AVRs, totally different from the Flash.h in DxCore (it's unfortunate that we named them the same thing).You now get a memory map too when you do Export compiled binary. Hopefully in future version I'll be able to automatically format it better than it is now - the first column is too small, so the columns don't line up; but because the numbers are hex, importing it into excel is annoying (excel is surprisingly bad at hexadecimal numbers)

Other than that, this is largely a bugfix release:

  • Wire clock generation now does something like what it claims. (#400)
  • Issue with PWM on PIN_PC0 and PIN_PC1 not working correctly when they are written in rapid succession. (#414)
  • analogReadEnh() and analogReadDiff() on the 2-series would incorrectly configure CTRLB, leaving it set to 0 (an accidental copy/paste error from the 1-series) which set the ADC prescaler to the minimum, guaranteeing that the ADC clock was out of spec after the first ADC reading. It worked surprisingly well in that state such that I had missed the issue until I saw it by chance while investigating ways to try to improve the accuracy, which just didn't seem to be very good (well no wonder!)
  • Fix a theoretical bug in optiboot on all parts when an application directly jumps to reset or runs off the end of flash (we now do a software reset if we detect that so adverse peripheral configurations can't hose the bootloader).
  • Lots of other little stuff. Boards.txt looks lovely now!