2022-05-31 06:48 AM
I made one bootloader then jumps to the application code, I set one GPIO pin as low before jump instruction then set GPIO pin as high at the beginning of the application code.
1, However, it takes so long time when measured by oscilloscope about 325ms.
and the bootloader runs well, I suspect what does the MCU do during that time why it takes some time?
2, another question is that during running in bootloader, I initialize the clock, gpio, after the code jumpes into the application, should I re-initialize the clock again, what will happen if I do not initialize?
Thanks
2022-06-14 05:31 AM
"I suspect what does the MCU do during that time why it takes some time?" - only your code can tell! How do you expect someone here to tell you what the MCU is doing while executing the code you wrote, without seeing it?
"another question is that during running in bootloader, I initialize the clock, gpio, after the code jumpes into the application, should I re-initialize the clock again, what will happen if I do not initialize?" - the MCU is just executing instructions. Wheter in bootloader area or application area, it's the same MCU. When you jump from bootloader to application the MCU internal state will not change, so the changes you made in bootloader are taken over.