2023-09-15 03:26 AM
Hi.
#CASE1. After 2 weeks of intense learning. I am able to blink LEDs, push button with interrupt, able to communicate TX/RX with PC through USART3, USART6 (tried with both PC6/PC7 or PG14/PG9) using 3 different methods (blocking, interrupt, DMA).. (all these above are using CubeIDE)
#CASE2. BUT.. now i face new issues. I want to start GUI , so I create a new project with TouchGFX (with just a textbox), and configure MX same as the above. but... unable to communicate USART3 to the PC.
So I try to check is the different between CASE1 and CASE2. since both is using the same board. I see that Found that 1: MX_USB_HOST_Init(); was not present in CASE2. but i managed to enable it in .ioc
Found that 2: Clock configuration is very different.
Does clock configuration matters? What could be the problem?
Is it that USART3 cannot be used when LCD touchscreen is enable? I need answer for this. Please advise which USART port is available when LCD is enable.
void StartDefaultTask(void *argument)
{
/* init code for USB_HOST */
MX_USB_HOST_Init();
/* USER CODE BEGIN 5 */
/* Infinite loop */
for(;;)
{
HAL_GPIO_TogglePin(LED2_orange_GPIO_Port, LED2_orange_Pin);
HAL_UART_Transmit(&huart3, "HELLO ",5,10);
HAL_Delay(1000);
osDelay(100);
}
/* USER CODE END 5 */
}
2023-09-15 06:32 AM
There is no restriction on using USART3 and the LCD together, provided the pins are available and connected to what you think they're connected to. USART3 is dedicated to the VCP on that board on pins PB10/PB11 and should always be available.
As for why it's not working, perhaps touchgfx is using too many resources and/or you have another bug in the program. Debug the program, step through the usart functions to ensure they execute.
2023-11-22 07:03 PM
I can repeat the problem.
It happen when configure the SYS -> Debug -> "serial wire" enable
If i stepped through the debug mode, during the initialize in main.c, strange things happen, example it takes longer to init GPIO, after GPIO, it skip to DMA, and back to GPIO..