I seem to have bricked my original 40h kit monome - or at least rendered it non-functioning.
The kit was working fine but I’d noticed it was a bit laggy with some led updates (particularly when using the launchd app in terms), and (perhaps wrongly) assumed that a slightly fresher 40h firmware than the original would make an improvement.
I grabbed the 40h kit firmware from https://github.com/monome/40h
Connected my JTAG ICE clone to the JTAG port on the 40h logic board and ran the following command:
avrdude -p m32 -c jtag1 -P /dev/tty.Repleo-CH341-000013FD -V -v -F -e -u -U flash:w:40h.hex -U lfuse:w:0xee:m -U hfuse:w:0x00:m
Everything seems to write ok (reports 3006 bytes written, and fuses write correctly).
I found that if I didn’t use the -V option to prevent automatic verification, then the command would fail with errors trying to read back from the chip.
Likewise, I needed to use -u to force the writing of the fuses, otherwise it seemed that avrdude would set them back to defaults.
When I disconnect the JTAG programmer and connect the 40h back in, I get no test pattern lighting up on the grid, and although I can select the 40h as a device in serialosc, with the original device ID (m40h0504), no key presses are detected and no leds can be lit up, so I’m assuming I broken something badly.
I’ve checked things like fuses being correct:
avrdude -p m32 -c jtag1 -P /dev/tty.Repleo-CH341-000013FD -v -U lfuse:r:-:r -U hfuse:r:-:r | hexdump
gives me:
avrdude: safemode: lfuse reads as EE
avrdude: safemode: hfuse reads as 0
avrdude: safemode: Fuses OK (H:FF, E:00, L:EE)
avrdude done. Thank you.
0000000 ee 00
(Note that the last line is the output of the hexdump, which seems to confirm that the fuses are set correctly, even though the last line of the safemode output from avrdude indicates the fuses are not correct).
I’m hoping that there’s something basic that I’ve missed, as from what I understand it’s hard to get the old ATMEGA32 chips now, so if I’ve actually bricked the chip, that will be painful…
I know this is all somewhat ancient history now, so maybe there’s not many folk maintaining a 40h, but any advice much appreciated!