I am using XMEGA 32A4u.
The PCB is fixed in a plastic cabinet and the USB connector is mounted on an Aluminium plate.
In my project Xmega device is self powered and VCC from USB is left unconnected.
I am using pfleury_lcd LCD library and sysclk_init() function to initialize clock with following settings.
#define CONFIG_USBCLK_SOURCE USBCLK_SRC_RCOSC #define CONFIG_OSC_RC32_CAL 48000000UL #define CONFIG_OSC_AUTOCAL OSC_ID_XOSC//OSC_ID_RC32MHZ #define CONFIG_OSC_AUTOCAL_REF_OSC OSC_ID_XOSC//OSC_ID_USBSOF #define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_RC32MHZ #define CONFIG_SYSCLK_PSADIV SYSCLK_PSADIV_2 #define CONFIG_SYSCLK_PSBCDIV SYSCLK_PSBCDIV_1_2
LCD hangs on power on and works only when we approach our hand near ground points.
I am not sure where to look for this problem.
I have referred to AVR1017: XMEGA - USB Hardware Design Recommendations and I am using following schematic for USB connections.
Can there be a problem due to LCD library in reading busy pin due to which the LCD hangs ?