2024-10-09 04:12 AM - last edited on 2024-10-09 04:21 AM by SofLit
I have an STM32H745 Discovery board. The first problem I encountered was when I was creating interfaces using TouchGFX. I could upload them to the microcontroller via the application without any issues, but when I uploaded the code file through CubeIDE, I encountered a problem. I discovered that I needed to include a boot file.
Once I did that, it worked, and the interfaces appeared, allowing me to modify and upload them. However, when I added the USB host initialization, the screen froze without me adding any line of code. After that, the microcontroller refused to accept any code. I had to use the reset button with CubeProgrammer in power-down mode to restore it before it could take the code again.
I tried testing the microcontroller by uploading a colored background code. The code uploaded successfully, but nothing appeared on the screen. Note that I have a demo from Embedded Wizard, and when I upload it, the screen works.
Did I damage something with the microcontroller's addressing? How can I fix it
2024-10-09 04:18 AM
Hello @motaz9898 and welcome to the community,
Are you sure your are configuring the Power mode in SMPS and not in LDO config?
2024-10-09 04:58 AM
@motaz9898 wrote:, when I added the USB host initialization,
result your code is incomplete and or hardfault handler ... sometimes some line adding is required , for USB host more as ...
2024-10-09 06:26 AM
"I added that there is a USB host using CubeMX, generated the code, and uploaded it."
2024-10-09 06:42 AM
"The board works with the demo program."
"The board does not work here, even though it was previously working with the same program."
"For your information, I have modified many of the frequency values within the settings. I even raised the input frequency to a value of 48."
2024-10-09 06:50 AM
Again what is the power config you set? SMPS or LDO?
The power config needs to be set to SMPS as STM32H745 Discovery is configured in SMPS by hardware.
Show you RCC config from this CubeMx window:
2024-10-09 09:59 AM
2024-10-09 10:06 AM
And i write adding USB host in MX dont equal working code generated. Debug it.