2019-10-08 10:39 AM
Hello,
I writing an application code that will allow the system memory bootloader to be entered via a simple USART receive. I basically followed this post and got it working successfully:
https://community.st.com/s/article/STM32H7-bootloader-jump-from-application
This was the first piece of the puzzle though. The end goal is to have a custom Python GUI to upload a .bin file to the chip through the standard USART bootloader. I have been developing and debugging this GUI extensively, and watched everything on the logic analyzer to make sure it's sending what I expect, and that the ACKs are truly being received.
I have tried this process that works without the GUI, to confirm my setup is good:
The python program seems to be working in theory, and this is what the steps are:
My question is, what could be the possible difference between what the STM32CubeProgrammer is doing and what my Python code is doing?
Here are some things I've noticed on the logic analyzer when comparing the two:
My code doesn't do any of this, but I don't see why it should need to. I've also verified the option bytes are set to have Readout Protection at level 0.
Is there more detailed information on what the STM32CubeProgrammer is doing behind the scenes? Any ideas on what could be happening?
Please see the attached Python code (if interested). I can't understand what would be preventing the user code from running after I apparently successfully upload it all via my GUI.
Thanks for any help in advance.
2019-10-08 09:07 PM
Download and compare the flash after programming with both methods and look at the differences.
2019-10-09 06:14 PM
Thanks for the advice. I was about to do this, but finally tried reading the bytes another way from the binary file. For some reason the encoding I was reading the binary file with was reading most of the bytes correctly, but there must have been some weird ones in the middle that got screwed up and I didn't notice them when looking at the beginning and end on the logic analyzer. I ended up getting it to work correctly and how have a stable, simple, and customizable GUI tool that should be platform independent at the end when I make an executable from it.