Tool/software:
Hi,
in my current project, I developed custom flashed based secondary bsl and using it to upload application via UART serial comms.
But my intention is to go into the bsl when the device is powered on so I located BSL at 0x00000000 of flash and located Application code at 0x00002000.
Inside the BSL application, PA8 is used as GPIO output and set HIGH so as to enable the "output" IC's UART function and upload the APP code. Once the uploading and verification process have been done, the BSL will jump to the valid application start address.
But in the application code, I found out that the program "hangs" once this PA8 is initialized as GPIO output. To address the issue I disabled the PA8 digital output and upload the application code again and it worked as intended.
The strange issue is that I can enable PA8 digital output if I flash directly to the device without bootloader on another device, i.e. the application code starts at 0x00000000 as usual, and the application code works well again.
So the issue exists only if I upload the code through bootloader.
What would be the reason? Is there something that I missed? Please advise and thanks so much in advance.