I say I think it is the bootloader because of the troubleshooting steps I followed. Somewhere I read that if a loopback test is successful then it was probably a problem with the bootloader. And the loopback test works fine.
Here is the schematic that I followed for reburning the bootloader.