c--- / ArduinoUSBLinker

Arduino based USB Linker protocol
GNU General Public License v2.0
60 stars 18 forks source link

help get it working on 32u4 adafruit feather #2

Open fschmid opened 5 years ago

fschmid commented 5 years ago

First tried on a Arduino DUE and feather M0 -> no EEPROM Support switched to 32u4 (has EEPROM) but no Timer2 available so I modified the code to use Timer1
after compile & upload the serial device (ttyACM0 in my case) disconnects after successful upload an restart I guess. after resetting the board the ttyACM0 reappears but only for a few seconds, then its gone again if I connect/disconnect the USB Cable (without resetting) nothing happens in syslog, no serial device is recognized.

Could you give me hint on how to reactivate the USB Port for flashing?

c--- commented 5 years ago

Technically EEPROM support is not required because it just stores settings but all the settings have defaults that should work. The MultiWii code does not use the EEPROM. You might try searching through the code and in the sections that use EEPROM just substitute the MultiWii code or some modification of the MultiWii code. All sections have defined(MULTIWII) tests.

As for the 32u4 I'm not sure but it sounds like the serial port is failing to initialize or run. It could be that Timer1 is used for the serial port, I can't remember. When you see it initially that may be the bootloader then when the main code runs the serial port stops working. What type of device is it? You might have to catch it and start flashing before the bootloader exits (start flashing at just the right moment after reset). Either that or reprogram via ISP or whatever it uses to program when there is no bootloader. I'm not familiar with the 32u4.

fschmid commented 5 years ago

Switched to Timer3 but same issues. That is a 16bit Timer which might have some consequences on the code. EEPROM Stuff is working on the 32u4 but thanks for the Tipp.