STM32F746 touchgfx and USB don't work
I am not able to use both USB (CDC or MSC class tested) and touchgfx (GUI) in my device which consist of:
STM32F746, 800x600 touchscreen, external qspi flash for assets, external sdram and other peripherals like spi or i2c. Firmware is based on freertos.
The main problem is that usb communication cannot work in parallel with gui interface, in separate they work properly with other device functionalities. Right now I handle it by switching device to usb or gui mode during startup but it cannot be final solution.
void StartDefaultTask(void const * argument)
{
/* init code for FATFS */
MX_FATFS_Init();
/* init code for LIBJPEG */
MX_LIBJPEG_Init();
/* init code for USB_DEVICE */
if (device_mode == USB_MODE)
MX_USB_DEVICE_Init();
/* Graphic application */
if (device_mode == GUI_MODE)
GRAPHICS_MainTask();
/* USER CODE BEGIN 5 */
/* Infinite loop */
for(;;)
{
osDelay(1);
}
/* USER CODE END 5 */
}When I try to launch them together the screen freezes and does not respond for the touch, the usb does not initialize on PC. Kernel logs show something like this:
USB 2/3 device descriptor read64, error -110 three times followed by
usb-2/3 device not accepting address 4, error -110
usb-2/3 device not accepting address 5, error -110I tried to debug USB initialization and the MX_USB_DEVICE_Init() does not go to ErrorHandler().
I use little deprecated toolchain but the device is certified and I need to stick to these tools:
HAL LIB STM32Cube_FW_F7_V1.15.0
- STM32CubeMX v 5.3.0
- SW4STM32 Version: Neon.3 Release (4.6.3), Build id: 20170314-1500
- TouchGFX Designer 4.10.0
- STM32 ST-LINK Utility 4.5.0.0
but I am open for propositions of upgrade that can solve the problem in 100%.
Do you have any ideas how to launch them together?
