Hello everyone, I am new to the forum and would like some help with a project I am working on.
I'm using an Atmega32U4 to use as an Arduino and a FE1.1S USB hub. I decided to only use one pin of the 32U4(I know, what a waste) to control some LEDs and use the FE1.1S hub so that I can use another board for buttons. It is my first time making a project with the 32U4 but I have used the USB hub in the past with success.
I managed to flash the Arduino Leonardo bootloader to the MCU with an Arduino Uno but my problem is that I can only get it to work sporadically. It then stopped working and I could not upload any code, it would begin to upload but then disconnect. I did noticed that I connected pin 21 to the capacitor instead of pin 26 on the USB hub. I don't know if connecting the wrong pin to the capacitor is what is causing the problem or if I connected something wrong on the PCB.
I will attach the pictures of the schematic and the layers of the board(Please excuse the amateur schematic and routing

). Any help is greatly appreciated.