hello to everybody:
In my project, it has boot and app.in boot ,l have initialized clock and flexcan and GPIO.
Now, l want to initialize uart in app, whether l need to reinitialize clock ? l have tested it, in app l initialize uart if failure. The app project l have upload.if you have some measure ways,please upload,thank you.
Original Attachment has been moved to: lpuart_echo.zip
In my opinion both approaches could work.
If you have your own custom bootloader (completely under your control) and where you do some basic clock initialization and then simply jump into your app it could work.
On the other hand if you use a 3-rd party bootloader e.g. RAppID BL I'd not rely on the bootloader clock configuration and configure all peripherals by the app. Plus it is more convenient from debugging point of view.
Hope it helps.
Unfortunately your attached project - App does not include the bootloader.
Question if initialization of clocks should be done by the app. highly depends on your bootloader is implemented.
As a general suggestion - if your custom Bootloader does an intended reset to jump to App I'd suggest to re-initialize clocks by the application. It does not hurt anything - it just adds a small delay before APP main() gets executed.
The advantage is you can easily debug application without a bootloader.
thank you for you response firstly. not long ago,my city FAE told me that if boot has initialized clock,app should not initialize clock, otherwise app maybe runs error.it has caused considerable worry for me.
Today ，you told me that clock can reinitialize in APP,can you give the exact answer whether clock can reinitialize in app.
l am look forward to you answer.thank you.