platform-atmelmegaavr icon indicating copy to clipboard operation
platform-atmelmegaavr copied to clipboard

UPDI pin mode or MVIO mode fuses for AVR-DD

Open tactical-snacks opened this issue 2 years ago • 3 comments

for AVR-DD's ...

  • adds setting mvio fuse support
  • enables updi pin bit by default

may help closing issues #60

tactical-snacks avatar Jun 07 '23 23:06 tactical-snacks

The PR looks mostly good, but it would make it impossible to use PlatformIO to turn the UPDI pin into a GPIO pin.

You should probably do something like this instead (untested):

        if ("dd" in board.get("build.mcu").lower()):
             if pin == "updi":
                 updipin_bit = 1
             elif pin == "gpio":
                 updipin_bit = 0
         else:
             updipin_bit = 0            
         return 0xC0 | updipin_bit << 4 | rstpin_bit << 3 | eesave_bit

MCUdude avatar Aug 21 '23 17:08 MCUdude

how/where could i add board_hardware.updipin for the avr-dd since it has multipurpose reset and updi pins?

tactical-snacks avatar Sep 08 '23 02:09 tactical-snacks

should i close this?

tactical-snacks avatar Apr 09 '24 16:04 tactical-snacks