Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
25e8762
Fix operator precedence in ADC-disabled check
ws-asahi Aug 8, 2026
63c042f
Fix unreachable chan=255 (auto-select) in event generator pin setup
ws-asahi Aug 8, 2026
30f456d
Flash: fix writeBytes - dropped trailing byte, corrupted neighbour, l…
ws-asahi Aug 8, 2026
3ff0d58
boards.txt: AVR DU highestcb is B1, not B2 (no DU part has a TCB2)
ws-asahi Aug 7, 2026
c7d35d1
boards.txt: AVR DU - define resetpinbits/eesave and actually write SY…
ws-asahi Aug 8, 2026
7928475
AVR DU: menu-controlled VUSB regulator enable for non-USB use
ws-asahi Aug 8, 2026
66d04a8
analogRead: shift by native resolution, fixing 10-bit reads on the DU
ws-asahi Aug 8, 2026
48d3a1a
wiring_extra: DU-series cannot use EVGENCTRL bits 3/7 as in-use flags
ws-asahi Aug 8, 2026
fa343ef
DU variants: give USART0/USART1 usable default mux positions
ws-asahi Aug 8, 2026
87648a2
PWMTest: make the example run on the DU-series
ws-asahi Aug 8, 2026
31f60f8
usbvreg: correct the rationale in comments - PC3 does not need VUSB
ws-asahi Aug 9, 2026
503c63a
ADC: fix DU internal channels and analogClockSpeed on the DU
ws-asahi Aug 26, 2026
2f87cd9
AVR DU: native USB stack (CDC + Pluggable USB), interrupt-driven
ws-asahi Aug 9, 2026
6f67a32
HID: bundled basic HID library for USB-capable parts
ws-asahi Aug 9, 2026
52a2af5
usbcdcboot: clean-room USB CDC bootloader for the AVR DU-series
ws-asahi Aug 9, 2026
0b3b9b2
usbcdcboot: prebuilt hex files for all DU parts
ws-asahi Aug 9, 2026
b07a964
boards.txt + variants: AVR DU-series (USB CDC Bootloader) board
ws-asahi Aug 9, 2026
bf9273c
Flash: support writes from app under the DU CDC bootloader
ws-asahi Aug 9, 2026
b4efe27
gitignore: exclude platform.local.txt (local toolchain override)
ws-asahi Aug 9, 2026
1c00454
docs: DU USB support is implemented - update the part pages and README
ws-asahi Aug 9, 2026
189c1f5
boards.txt: section banners for the avrduusb board (style parity)
ws-asahi Aug 9, 2026
7e8fce1
boards.txt: insert some line feed
ws-asahi Aug 9, 2026
59bac04
docs: more DU corrections - README peripheral lists, stale 'on the wa…
ws-asahi Aug 9, 2026
7d1e472
docs: add the DU where the references list every series but it
ws-asahi Aug 9, 2026
785e180
docs: add Ref_USBCDCboot - user-facing reference for the DU USB bootl…
ws-asahi Aug 9, 2026
c763c28
docs: edit line feed Ref_USBCDCboot.md
ws-asahi Aug 9, 2026
acbc8e8
docs: Ref_Defines - list the DU pincount macros and document USBCON
ws-asahi Aug 9, 2026
eff884a
docs: DU details in CORE_PART_ID, Ref_Analog, Ref_Digital, Ref_Serial
ws-asahi Aug 9, 2026
9148a95
docs: correct the DU PC3 note (plain VDD GPIO) and note the DU has no…
ws-asahi Aug 9, 2026
7f746c4
docs: Add AVR DU to MUXNEG internal table
ws-asahi Aug 9, 2026
26272ef
usb_cdc: remove development diagnostics (breadcrumbs and byte counters)
ws-asahi Aug 24, 2026
511b569
usb_cdc: defer the 1200 bps touch reset until its status stage completes
ws-asahi Aug 24, 2026
bf688b9
docs: the DU INLVL works on silicon but is gone from the datasheet
ws-asahi Aug 25, 2026
727e5f7
USBSerial: add the standard Serial_ CDC accessors (dtr/rts/baud/...)
ws-asahi Aug 26, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ megaavr/extras/.DS_Store
*.pyc
/megaavr/tools/libs/pymcuprog/deviceinfo/__pycache__
*.bak

# Local environment-specific tool paths (not for upstream)
megaavr/platform.local.txt
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ In a couple of sentences, all the "modern" AVRs.
* `AVR DA` - Dx-class mid-high pincount general purpose MCU, pincounts 28-64, flash 32k-128k. No HF crystal. Yes QTouch (which we now have a library for!).
* `AVR DB` - Dx-class mid-high pincount **MVIO** and **OPAMP** MCU, pincounts 28-64, flash 32k-128k. Yes HF crystal. No QTouch.
* `AVR DD` - Dx-class low-mid pincount, low-cost **MVIO** MCU, pincounts 14-32, flash 16-64k.
* `AVR DU` - Newly supported, Dx-class, low-mid pincount **USB** MCU. (anyone know anything about making USB work?)
* `AVR DU` - Newly supported, Dx-class, low-mid pincount **USB** MCU. Native USB CDC serial, Pluggable USB (HID/MIDI), and a USB CDC bootloader are included.
* `AVR Ex family` - **Supported by DxCore** Newer line of AVRs. These have a clock and ALU apparently derived more closely from the tinyAVRs than the Dx-series, complete with the speedgrades. Features the new ADC from the 2-series.
* `AVR EA` - The first EA-series part, a mid-range, mid-pincount general purpose MCU with proper differential ADC.
* `AVR EB` - A lower flash, low-mid pincount MCU with new advanced timers which take advantage of a fancy new PLL, intended for BLDC motor control applications.
Expand Down Expand Up @@ -408,6 +408,7 @@ The analog comparators are exposed through the [**Comparator library**](https://
* 2 on 28 and 32 pin DA/DB
* 3 on 48/64 pin DA/DB
* 1 on all DD-series
* 1 on all DU-series
* 2 on all EA-series

#### Configurable Custom Logic
Expand All @@ -426,6 +427,7 @@ The ZCD(s) are exposed through the [**ZCD library**](https://github.com/SpenceKo
* 2 on 28 and 32 pin DA/DB
* 3 on 48/64 pin DA/DB
* 1 on all DD
* The DU-series does not have a ZCD
* The EA-series does not have a ZCD

#### Timers
Expand Down Expand Up @@ -588,6 +590,8 @@ The USARTs (Serial) have some additional features not seen on the official cores
There are two ways to access constants stored in flash on DxCore. Which ones can read data stored where can be confusing; this document should make this clear.
#### [Optiboot Bootloader](https://github.com/SpenceKonde/DxCore/blob/master/megaavr/extras/Ref_Optiboot.md)
An Optiboot-derived bootloader is provided and may be optionally used. How that impacts operations is described here. This covers relevant considerations for deciding whether to use it as well.
#### [USB CDC Bootloader (AVR DU-series)](https://github.com/SpenceKonde/DxCore/blob/master/megaavr/extras/Ref_USBCDCboot.md)
The DU-series can be bootloaded over its native USB instead - no serial adapter needed. Entry conditions, uploading, the LED, and writing to flash from the app are described here.
#### [SerialUPDI](https://github.com/SpenceKonde/AVR-Guidance/blob/master/UPDI/jtag2updi.md)
Serial UPDI is our recommended tool for UPDI programming.
#### [Clock Information](https://github.com/SpenceKonde/DxCore/blob/master/megaavr/extras/Ref_Clocks.md)
Expand Down
402 changes: 399 additions & 3 deletions megaavr/boards.txt

Large diffs are not rendered by default.

255 changes: 255 additions & 0 deletions megaavr/bootloaders/hex/usbcdcboot_16du.hex
Original file line number Diff line number Diff line change
@@ -0,0 +1,255 @@
:1000000043C000005CC000005AC0000058C000009F
:1000100056C0000054C0000052C0000050C0000094
:100020004EC000004CC000004AC0000048C00000A4
:1000300046C0000044C0000042C0000040C00000B4
:100040003EC000003CC000003AC0000038C00000C4
:1000500036C0000034C0000032C0000030C00000D4
:100060002EC000002CC000002AC0000028C00000E4
:1000700026C0000024C0000022C0000020C00000F4
:100080001EC000001CC0000011241FBECFEFCDBF5A
:10009000DFE7DEBF18E7A0E0B8E7EEE9FFE002C067
:1000A00005900D92A830B107D9F72CE7A8E0B8E782
:1000B00001C01D92A433B207E1F72BD0F1C6A0CF47
:1000C000CF93DF9300D0CDB7DEB78AE190E0019700
:1000D00029F40F900F90DF91CF91089519821A8221
:1000E00029813A81283E334090F7000029813A81E6
:1000F0002F5F3F4F29833A83F3CF80E88093050435
:1001000080930204ABD288ED91E084BF909300010C
:10011000FFCF209140002CBB8FEF80934000809157
:100120001001806490E038ED34BF8093100124FF0B
:1001300034C01092347C1092357CC0E4DFE18091B1
:100140006800837C846298ED94BF8093680080E0AF
:1001500094BF809361008091650081FFFCCF4AD2FB
:10016000C9D295D3C0930878D093097880E880935A
:100170000104809305046CD210E8D0E0C0E013D1F4
:10018000BAD2A9D321968091087890910978C8179E
:10019000D907A8F310930704F0CF22FF25C0809160
:1001A000347C9091357C8D399B4639F41092347CA7
:1001B0001092357CC0E8DEE3C2CF8DE99BE68093E8
:1001C000347C9093357C80E880930104DAE0C0E8C9
:1001D000C093060475DFC093050472DFD150C1F7E8
:1001E000C0930504C09302041092347C1092357CB5
:1001F000E0E0F0E185919491C0E0DDE7019609F43B
:100200009ECFF89480E88093050480930204809147
:10021000100128ED8F7B90E024BF80931001109295
:10022000000C1092010C80910110806324BF809318
:100230000110E0E0F8E0099480910B0C82FDFCCF06
:100240000895EAEEF8E781A1846081A381A5846026
:1002500081A710921078109211780895CF939B0186
:100260004617570708F49A01FC01A2EAB8E72134BF
:10027000310580F080931679909317792093147943
:1002800030931579109218791092197983E717C075
:1002900081918D93CD01825A984782179307C0F3BD
:1002A00082EA98E7809316799093177920931479CE
:1002B00030931579109218791092197983E480930C
:1002C0001379BADFCAE6C093420CB6DFC093400C84
:1002D00081E090E08093107890931178CF91089509
:1002E000EAEEF8E712A613A616A617A683E481A7DE
:1002F000A3DF8AE68093420C83E090E0809310783D
:10030000909311780895EAEEF8E782E291E0DF0138
:100310009C011D9221503040E1F783E481A322EE3D
:1003200038E724A335A310A281A782EA98E784A71F
:1003300095A782E080A791E891AF22E938E724AF42
:1003400035AF80AF93E890932B7922E538E720937F
:100350002E7930932F7910922A799093437922E164
:1003600038E720934679309347798093427908950E
:10037000B7CF74CFEAEEF8E784A795A712A613A625
:1003800066A777A783E681A757DF8AE68093400CAC
:1003900082E090E0809310789093117881E08093D0
:1003A0000D7808954ECFCF93DF9380910A0CC091C2
:1003B0000B0C84FF11C01092030CA5DF1092107873
:1003C0001092117810920E7810920F7810920D788A
:1003D0006FD180E180930A0CC0FF17C083E4809343
:1003E0000B798093137928DFD0E1D093400C24DF80
:1003F000D093420C8091E278807609F1803209F442
:10040000A9C01FDF81E080930B0CC5FFE4C0809181
:10041000127985FFA9C010DF80E28093420C8091A1
:100420001078909111788130910509F497C0059763
:1004300009F4D4C0109210781092117895C0E09110
:10044000E378EC30F0F6F0E0E95DFD4F1CC5980272
:10045000A5020102A5020102740233020102810217
:100460008E02A702A5028091E4789091E578292F69
:1004700033272230310561F02330310599F02130E6
:10048000310509F0BECF62E170E08EE39FE804C061
:1004900063E470E08BEF9EE84091E8785091E97852
:1004A000DDDEB0CF99278130910569F0C0F0823050
:1004B000910579F0039709F0A4CF6091A48E70E0C4
:1004C00085EA9EE8E9CF6091E68E70E087EE9EE8CF
:1004D000E3CF6091BB8E70E08CEB9EE8DDCF64E0F3
:1004E00070E087EF9EE8D8CF8091E4788F77809393
:1004F0000F78F6DE85E090E0809310789093117885
:1005000081CF80910E7880930A784091E87850915D
:10051000E97861E070E08AE098E7C2CF8091E47802
:1005200080930E78DDDE88DE82E08093480C6ACF0F
:1005300010920B7810920C784091E8785091E978FD
:1005400062E070E08BE098E7ABCFCADE5BCF109241
:100550000A78DBCF82EE98E787D054CF84E090E032
:10056000809310789093117880910A7985FF12C05A
:1005700063DE80E28093400C809110789091117836
:10058000029799F580910D78882319F010920D78D3
:1005900089D0A6DE8091227985FF04C04DDE80E2FD
:1005A0008093460C80912A7985FF09C045DE80E260
:1005B0008093480C80912C7990912D798AD08091EC
:1005C000427985FF05C038DE80E280934E0C8FD0E3
:1005D00080E280930B0CDF91CF91089580910F788A
:1005E0008093030C10920F7825CF10921078109200
:1005F0001178D0CF809168008C7B826498ED94BF95
:100600008093680081E08093060F8FE697E1019761
:10061000F1F700C0000077DE8AE099E78093060CCE
:100620009093070C1092080C1092090C83E88093A9
:10063000000C80E492E4AFE0B0E02091850020FD62
:1006400004C00197A109B109C1F71092010C0895E6
:10065000E0E0FCE08181816081830895E0E0FCE0DE
:1006600081818E7F81830895FC019181913299F07F
:1006700018F4903221F096CE9432E8F779CE868144
:1006800097810797C1F781E08093137A67E070E064
:1006900080E098E76FCE4681578167E070E080E0A8
:1006A00098E767CE8091137A81111092137A08959A
:1006B0001092117A1092127A10920F7A1092107A88
:1006C00010920E7A10920C7A10920D7A1092137A80
:1006D00008958134910510F080E490E08093117AC0
:1006E0009093127A10920F7A1092107A08951092C5
:1006F0000E7A0895DDCF8091117A9091127A892B2C
:10070000F1F020910F7A3091107A8091117A9091C6
:10071000127A2817390798F01092117A1092127AEB
:1007200010920F7A1092107A10922C7910922D79E3
:1007300080910B0C82FDFCCF82E08093480C80916D
:100740000E7A811120C080910C7A90910D7A892BBC
:10075000D1F08091427981FF16C080910C7A9091FE
:100760000D7A809344799093457980910B0C82FDAA
:10077000FCCF82E080934E0C81E080930E7A109241
:100780000C7A10920D7A089520910F7A3091107A98
:100790008091117A9091127A2817390788F4809104
:1007A0000F7A9091107A9C012F5F3F4F20930F7A20
:1007B0003093107A8E5A9748FC01808190E008951A
:1007C0008FEF9FEF0895CF93C82F80910C7A90916F
:1007D0000D7A8034910598F480910C7A90910D7A7D
:1007E0009C012F5F3F4F20930C7A30930D7A8E5EE1
:1007F0009748FC01C083CF9108957DDFD4DD8091BF
:100800000E7A8111FACF80910C7A90910D7A803412
:10081000910598F7E1CF80910C7A90910D7A892B10
:1008200089F480910E7A81110DC0089564DFBBDDDB
:1008300080910E7A811106C080910C7A90910D7A88
:10084000892B01F180910E7A8111F0CF80910C7A81
:1008500090910D7A892B51F380910C7A90910D7AB9
:10086000809344799093457980910B0C82FDFCCF65
:1008700082E080934E0C81E080930E7A10920C7A85
:1008800010920D7A089584E19EDF80E19CCF109252
:10089000327C1092337C10922F7C1092307C10921C
:1008A0002E7C1092197C1092177C1092187C10925A
:1008B000167C1092147A1092157AEAE1FCE784E132
:1008C000DF011D928A95E9F740E052E06FEF70E09A
:1008D00086E19AE7DEC23F924F925F926F927F92DB
:1008E0008F929F92AF92BF92CF92DF92EF92FF9240
:1008F0000F931F93CF93DF9300D000D0CDB7DEB717
:1009000083E0382E92E0E92EF12C20EF922E34E095
:10091000C32ED12C41EF842EAA24A394B12C34DF12
:1009200097FF15C02496CDBFDEBFDF91CF911F91F9
:100930000F91FF90EF90DF90CF90BF90AF909F907E
:100940008F907F906F905F904F903F900895482FC9
:100950002091327C3091337C2230310509F477C00C
:10096000C8F42115310509F445C021303105B9F627
:10097000E091197C91E09E0F9093197CF0E0E65E87
:10098000F348808380912E7C815080932E7C882335
:10099000E9F1C5CF2430310509F465C108F432C14D
:1009A0002530310509F0BBCFE091197C91E09E0F15
:1009B0009093197CF0E0E65EF348808380912E7C72
:1009C000815080932E7C8111AACF80911A7C9091C6
:1009D0001B7C9827892798278093177C9093187CF5
:1009E00020911C7C2093167C8130924078F4809278
:1009F000317C0CC08093317CE0EDE80FE63430F4BC
:100A0000F0E0E05BF04780818E3F29F4E092327C99
:100A1000F092337C84CF8F3F79F41092197C30921E
:100A20002E7C83E090E0443611F085E090E08093E6
:100A3000327C9093337C73CF882341F31092197CDE
:100A400080932E7CA092327CB092337C68CF80322F
:100A500009F069C08091317C803F31F58091167C2E
:100A60008F7D863499F42091177C3091187C6091A9
:100A70002F7C7091307C90E080E046E15AE716D1FF
:100A800002DF1092327C1092337C49CF8534C1F75B
:100A90004091177C5091187C66E17AE780912F7C19
:100AA0009091307CA8D1ECCF813F81F584E18BDE41
:100AB00040902F7C5090307C712C612C10E000E035
:100AC0008091177C9091187C0817190718F080E125
:100AD0007ADED7CF8091167C8F7D863459F4C3019E
:100AE000B201600F711F811D911D68D16CDE0F5F17
:100AF0001F4FE6CF853441F480912F7C9091307C5C
:100B0000800F911FB6D1F2CF8FEFF0CF853409F46B
:100B1000B7CF90F4803409F4B3CF38F4803309F4BC
:100B2000AFCF8133A9F185E1D3CF813409F43EC041
:100B3000823409F4A5CFF7CF823509F4A1CFC0F4F0
:100B4000803509F49DCF813571F784E13CDE80E189
:100B50003ADE61DE19821A821B821C8289819A81A7
:100B6000AB81BC8180349D40A340B10580F1C5DAE2
:100B70008635C9F1853709F43AC08535A1F68091EB
:100B80001A7C90911B7C80932F7C9093307C78CF43
:100B900084E119DE06E91FE8FFE80D391F0709F4B3
:100BA00096CFF80181918F010EDEF6CF80911A7CED
:100BB00011E0803839F018E0813821F012E08238F5
:100BC00009F013E084E1FFDD812FFDDD80CF898115
:100BD0009A81AB81BC810196A11DB11D89839A8345
:100BE000AB83BC83BBCF84E1EEDD80E0EECF84E15C
:100BF000EADD80918010E7DD80918110E4DD809155
:100C00008210E3CFE091197C91E09E0F9093197CC4
:100C1000F0E0E65EF348808380912E7C81508093E3
:100C20002E7C81117CCE80911A7C90911B7C982720
:100C3000892798278093177C9093187C20911C7C9F
:100C40002093167C8130E2E09E0708F0DFCE109200
:100C5000147A1092157A892B09F4D8CEC092327C7E
:100C6000D092337C5CCE2091147A3091157AA90110
:100C70004F5F5F4F4093147A5093157A2A5E354840
:100C8000F90180838091177C9091187C481759074F
:100C900008F445CE9092317CB9CE9091061091FD2A
:100CA000FCCF9DE994BF809300100895CF92DF920E
:100CB000EF92FF920F931F93CF93DF936115E0E1C3
:100CC0007E078105910508F470C02115310509F4EE
:100CD0006CC089012130324010F000E012E0209118
:100CE0000110E1E0F0E0611530E87307810591053E
:100CF00010F4F0E0E0E07A016F0184E0CC0CDD1C40
:100D00008A95E1F72F7C2C2938ED34BF2093011010
:100D1000EB01D06888E0C1DF8FEF888380910610F7
:100D200081FDFCCF81E0B9DF809101108F7C8C299F
:100D300098ED94BF8093011082E0AFDFF70181E06E
:100D400090E0AE014E195F09DA01AE0FBF1F8017A8
:100D50009107E8F0A8014E7FC40FD51F4017510737
:100D600060F4E40EF51EF701808190E09F6F8883A8
:100D700099838091061081FDFCCF81E0DF91CF91B6
:100D80001F910F91FF90EF90DF90CF9086CF218140
:100D900030812327322723272D933C93209106105F
:100DA00021FDFCCF02963296CFCFDF91CF911F91DC
:100DB0000F91FF90EF90DF90CF9008954091011038
:100DC00021E030E0611550E875078105910510F4C8
:100DD00030E020E084E0220F331F8A95E1F7342FC2
:100DE0003F7C322B28ED24BF30930110AB015068BB
:100DF000FA01808108950F931F938F3F910509F0A9
:100E000058F58A0130E020E0080F191F211D311D1F
:100E10000130114021053105E0F040E051E0481B70
:100E2000590B209106102370E1F72DE924BF23E12F
:100E300020930010460F571FFB01861B970B9C5EEB
:100E4000E417F50761F48DE984BF81E08093001019
:100E500003C04115510529F71F910F910895DC0139
:100E6000AE0FBF1F21912C932091061020FDFCCFC7
:100E7000E7CF8F3F910509F020F49C5EFC01808153
:100E800008958FEF0895EE0FFF1F0590F491E02D68
:100E90000994DC0101C06D9341505040E0F7089582
:040EA000F894FFCFF4
:100EA40016160342004C0030003000300030003091
:100EB400003000300031002A2A034100560052005D
:100EC4004400550020004300440043002000420039
:100ED4006F006F0074006C006F00610064006500B7
:100EE40072001010034100560052004400550042A5
:100EF400004C00040309040902430002010080328B
:100F04000904000001020201000524001001052467
:100F140001000104240202052406000107058103DF
:100F240010004009040100020A0000000705020243
:100F34004000000705830240000012010002020085
:100F44000040091201000001010203010000FEFE3D
:100F5400FEFEFEFEFEFEFEFEFEFEFEFE020114FE90
:100F6400FE05FEFEFEFEFEFEFEFEFEFE000000FE90
:100F7400FE0204FEFEFEFEFEFEFEFEFEFEFEFEFE83
:100F8400FFFEFEFEFEFEFEFEFEFEFEFEFEFEFEFE7C
:0A0F9400FF004156522053544B0059
:080F9E0000C201000000080080
:040FFA00F8950895C9
:020FFE00011AD6
:00000001FF
Loading