cancel
Showing results for 
Search instead for 
Did you mean: 

Black screen when enabling "Debug: Serial Wire"

JanGlueck
Associate II

Hi guys,

 

I bought a STM32F469I-Disco Board. I have played around with TouchGFX example projects and had success adding an ADC (ADC1_IN9 connected to Pin PB1) conversion to the project and display the value on the touch display as text in a textArea as well as with a gauge.

I use DMA in circular mode and enabled cont. conversion and cont. requests. I use a task and queue in FREERTOS and as I said that part works fine.

Then I wanted to add UART to that project which should prompt a text every second. I chose USART3 because Pins PB10 and PB11 are connected to the virtual COM port of the built-in STLink. I activated Debug serial Wire under System Core / Sys because the tutorial I followed said so. Timebase source is TIM6.

The project compiles without errors. But when I flash the board the screen stays black.

Then I tried to revert erverything regarding UART and Debug Serial Wire (deactivate USART3, disable Debug) but the screen stays black.

 

Any Ideas? Thanks.

 

EDIT: The same happens to any other project. E.g. the DiceAnimation Demo in TouchGFX Designer: When I create the project new and flash the board it works just fine. When I then activate Degub: Serial Wire in Sys the screen is black after flashing and the project can not be recovered. Even when I deactive Debug Serial Wire again, the screen is black.

4 REPLIES 4
KDJEM.1
ST Employee

Hello @JanGlueck and welcome to the community,

 

Could you try running through the debug and see if the code is stuck in a HAL infinite loop? May be this post can help you: TouchGFX - Serial Wire debug problem.

 

Thank you.

Kaouthar

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

JanGlueck
Associate II

Hello Kaouthar,

 

thank you for looking into this.

I don't have this exact project anymore.

 

But I run into the same issue quite often: Project compiles without error, flashes, but screen stays black.

I started a blank TouchGFX project with only one screen and only one background image, no text, no button, nothing.

 

No serial wire debug.

Then I started adding things in CubeIDE: one timer that flashes one user LED (TIM2) and another timer that flashes another user LED (TIM9). That worked fine.

Then I wanted to add a DAC in DMA mode which should generate a sinewave. TIM7 is used to trigger the DAC. But already then I get the black sceen and also the LEDs do not flash. I increased the stack size of the defaultTask from 128 to 2048 but no luck. Then I deactivated the DAC again but I can't get the program to start anymore.

 

void StartDefaultTask(void *argument)
{
  /* USER CODE BEGIN 5 */

	HAL_TIM_Base_Start_IT(&htim2);
	HAL_TIM_Base_Start_IT(&htim9);
	HAL_TIM_Base_Start_IT(&htim7);

	HAL_DAC_Start_DMA(&hdac,DAC_CHANNEL_1, (uint32_t*) &dma_buffer, 2 * DMA_BUFFER_SIZE, DAC_ALIGN_12B_R);


  /* Infinite loop */
  for(;;)
  {
    osDelay(100);
  }
  /* USER CODE END 5 */
}

 

 

Right now, the MX_TouchGFX_Init(); does not finish. See screenshot.

JanGlueck_0-1736756054548.png

EDIT:

We seem to stop here:

JanGlueck_1-1736757264914.png

 

KDJEM.1
ST Employee

Hello @JanGlueck,

 

Thank you for updating this post.

Could you share the STM32F469I-DISCO board revision and the software versions STM32CubeIDE, TouchGFX? Are you using the latest software versions? 

 

Thank you.

Kaouthar

 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

JanGlueck
Associate II

Hello @KDJEM.1,

CubeIDE Version: 1.17.0

JanGlueck_0-1736835775734.png

TouchGFX Version: 4.24.1

JanGlueck_1-1736835839539.png

I always used this board in TouchGFX: 

JanGlueck_2-1736835909500.png

 

Disco Board Version:

20250114_072013.jpg

20250114_072045.jpg

 

Thanks,

Jan