cancel
Showing results for 
Search instead for 
Did you mean: 

Facing issues in configuring USART1 for debug messages on STM32H747I-DISCO board

BPraj.1
Associate II

Hello there!

I am trying to edit the USB_WEBCAM example application provided under FP_AI_VISION1 package for STM32CubeAI on STM32H747I-DISCO development kit. I want to add debug logs using the STLink Virtual com port UART interface, which as per the user manual is connected to USART1 of the MCU. Since the Example application doesn't come with a CubeMX .ioc file, I had to add the related initialization and handling code manually.

Therefore, I created another standalone project using CubeMX and configured the USART1 for the same and I was able to print logs using the STLink Virtual com port. Then I tried adding the same generated code and included the required stm32h7xx_hal_uart.c, stm32h7xx_hal_uart_ex.c and related header files to the USB_WEBCAM example application. I also tried to adjust the previous clock configuration of the example by adding the missing settings as in the standalone project, but I kept the PLL multipliers as is. With these changes the USB_WEBCAM example builds and runs successfully but I don't see anything printing on the terminal window.

I can understand that there must be some misconfiguration or I might have missed to add some settings but not able to find it out. I am doing such exercise for the first time and not able to get where the problem lies to correct it. Please help me resolving the same, I am attaching the code I added from the standalone project to USB_WEBCAM example. Please have a look and suggest.

Thanks in advance,

Regards,

Bhupendra.

1 ACCEPTED SOLUTION

Accepted Solutions

Make sure to clear the structures for the local/auto variables used in SystemClock_Config()

Double check the HSE_VALUE in stm32h7xx_hal_conf.h

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

View solution in original post

3 REPLIES 3

Make sure to clear the structures for the local/auto variables used in SystemClock_Config()

Double check the HSE_VALUE in stm32h7xx_hal_conf.h

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Dear @Community member​ ,

Thanks for your reply and inputs, the uart worked by intialising the local structure variables to 0, but now I can't see the camera output over USB. Could the UART configuration be conflicting with it?

Your inputs are really helpful, much appreciated!

Regards,

Bhupendra.

Generally these things should not interfere.

Check the clocks, PLL and pin settings.

Perhaps add code to unpack currently running settings in RCC, etc so you can see differences between running and non-running scenarios

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..