Changeset 3fde1f7 in avrstuff


Ignore:
Timestamp:
Jan 3, 2024, 9:42:22 PM (4 months ago)
Author:
PulkoMandy <pulkomandy@…>
Branches:
main
Children:
02817db
Parents:
029735c
git-author:
PulkoMandy <pulkomandy@…> (06/08/2023 17:14:23)
git-committer:
PulkoMandy <pulkomandy@…> (03/01/2024 21:42:22)
Message:

pcw2hid: Fixup programming instructions

Use a very slow SCK clock for loading up the fuses
Use a somewhat slow clock for loading up the bootloader

This allows to get both of them loaded reliably.

Location:
kbd/pcw2hid
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • kbd/pcw2hid/README.md

    r029735c r3fde1f7  
    1515
    1616- Finalize keymap
     17
     18Programming the device
     19======================
     20
     21Connect the board to the STK500 programmer ISP6 connector, make sure the clock is running, if not,
     22connect the crystal from the STK500 to the board crystal outermost pin.
     23
     24    pushd code ; make fuse ; popd
     25    pushd bootloader ; make avrdude ; popd
     26
     27Then connect the board by USB. It should be in DFU mode
     28
     29    pushd code ; make flash ; popd
     30
     31Disconnect and reconnect the board, it should still be in DFU mode
     32
     33Finally connect the keyboard to the board and reconnect it, this time it should show up as keyboard.
  • kbd/pcw2hid/bootloader/makefile

    r029735c r3fde1f7  
    2020TARGET       = BootloaderDFU
    2121SRC          = $(TARGET).c Descriptors.c BootloaderAPI.c BootloaderAPITable.S $(LUFA_SRC_USB)
    22 LUFA_PATH    = ../../LUFA
     22LUFA_PATH    =  ../code/lufa-LUFA-210130/LUFA
    2323CC_FLAGS     = -DUSE_LUFA_CONFIG_HEADER -IConfig/ -DBOOT_START_ADDR=$(BOOT_START_OFFSET)
    2424LD_FLAGS     = -Wl,--section-start=.text=$(BOOT_START_OFFSET) $(BOOT_API_LD_FLAGS)
    2525LTO          = Y
    2626
    27 AVRDUDE_PROGRAMMER=stk500
     27AVRDUDE_PROGRAMMER=stk500 -B20
    2828AVRDUDE_PORT=/dev/ports/usb0
    2929
  • kbd/pcw2hid/code/makefile

    r029735c r3fde1f7  
    5353        avrdude -u -c $(PROG) -p $(MCU) -Uflash:w:$^
    5454
     55flip: $(TARGET).hex
     56        avrdude -u -c flip1 -p $(MCU) -Uflash:w:$^
     57
    5558fuse:
    56         avrdude -u -c $(PROG) -p $(MCU) -U efuse:w:0xf4:m -U hfuse:w:0xd9:m -U lfuse:w:0x5e:m
     59        avrdude -u -c $(PROG) -B 2000 -p $(MCU) -U efuse:w:0xf7:m -U hfuse:w:0xd8:m -U lfuse:w:0xef:m
Note: See TracChangeset for help on using the changeset viewer.