Showing results for 
Search instead for 
Did you mean: 

Flash programming issue using custom tool

Associate II

Hi everyone, 
I facing some issues with the custom flash loader tool and MCU, I developed the tool and bootloader code of the STM32H503RBt6 controller, and I flashed the hex file using the custom tool, its works but the data is not flashed in the controller,

I configured the HSI Clock frequency 64Mhz(default freq),  set the voltage scaling is 2, FLASH_ACR_WRHIGHFREQ is 01,
I was debugging step by step, it flashed properly but normally(without debugging) it's not working. I can't understand it.

Anyone, please help to resolve this error, and suggest some ideas to develop the tool
I have lot of questions, like 
what freq range is used to MCU in the custom bootloader, voltage scaling level and FLASH_ACR_WRHIGHFREQ ( to better convenient)


Don't use the debugger to understand what's going on with real-time code operation.

Instrument the code so you can output status, progress and understand the flow, and why/how it fails.

With FLASH you're going to need to pay attention to the alignment of the addresses being written, the minimum write width, and that you're not attempting to write a flash-line more than once.

Look at the related FLASH examples in CubeH5

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

Hi @Tesla DeLorean  
can you tell me, what is the better frequency in the custom bootloader?

in the code, I developed the working code, it works in the debugging method only(step-by-step analysis), but in real-time(flow) it does not work(it doesn't write the data in flash memory).
Please help to resolve this problem

Frequency is irelevant. Your code isnt working. And debug can run code and then pause ...