Hello, I've designed a custom board based on Arduino Uno and I'm trying to upload the bootloader to ATMega16U2.
I've tried using flip software and the hex file included in the installation files of arduino and the board is now recognized as "Arduino Uno" by the IDE.
The problem is, that the clock is set to a lower speed and I can't upload a sketch serially to ATmega328P, as it seems that they are running in different baud rates.
I soldered on my board an ATMega16U2 from an actual Arduino Uno rev3 board which had the correct firmware and uploading sketches serially works fine, so it seems it's a firmware issue.
My question is, how can I change the clock speed of ATMega16U2? (It seems that is set to 1/8)
Also, where can I find a .hex file with a firmware for ATMega16U2 that is compatible with the bootloader for ATMega328P to upload serially a sketch?
Thanks in advance.