SpenceKonde / DxCore

Arduino core for AVR DA, DB, DD, EA and future DU-series parts - Microchip's latest and greatest AVRs. Library maintainers: Porting help and adviccee is available.
Other
180 stars 47 forks source link

AVR DD14 and 20 Reset Pin Not Working #383

Closed heywalker closed 1 year ago

heywalker commented 1 year ago

Grounding the Reset Pin, PF6, fails to reset the device. Tested on 5 AVR32DD14 and 1 each AVR16DD20 and AVR32DD20. Attempt to burn bootloader in case of a fuse problem, but doing so bricked 2 boards. I don't see a way to configure at boot time. Am I missing something absurdly simple? Any suggestions? DxCore 1.5.2, Arduino 1.8.13, Linuxmint, CP2102.

SpenceKonde commented 1 year ago

Marking as critical as boards are bricked by simple bootloading.

It is not unexpected that reset will not work without bootloading, see section 8.8.2.4 (numbering based on 64dd14/20 datasheet), default from factory is that reset is input, not reset.

However, when bootloading, instead of putting the UPDI and Reset pin config bits into bit 3 and 4, it's putting them into bits 2 and 3, so bootloading always disables UPDI. I will get a fix for this out ASAP. Bugs that ruin people's hardware (especially when the DD's can't use the same HV programmers that were designed for tinyAVR - tinyAVR gets the HV pulse on the UPDI/Reset pin, while the DD's need the HV pulse on the reset pin, while the UPDI pin isn't HV tolerant) definitely qualify as critical.

pcfreak1201 commented 1 year ago

Ahh, that make sense. Do you have a datasheet for DD, where the maximum voltage of the Reset is correct shown? All ones I found shows: "-0.3 to + 9.0)", that would not be compatible, with the 12V pulse of the HV-programmers, too.

heywalker commented 1 year ago

Happy Days! Reset now works, and no more bricked DD chips. Thanks!