AnsweredAssumed Answered

Started port of Kinetis bootloader KBOOT to K26 MCU

Question asked by Lucas Magasweran on Jan 8, 2016
Latest reply on Jan 12, 2016 by Mark Butcher

I need help porting the Kinetis bootloader KBOOT to a K26 MCU. I started with the TWR-K65F180M bootloader (flash resident as opposed to ROM resident) and have it building and running on my K26 target. However it currently keeps resetting to `main()` after executing the following line from `configure_clocks()`:

 

        // Change the Clock source to PLL because MCG switches from FEI to PEE mode

        SIM_BWR_SOPT2_PLLFLLSEL(SIM, 1);

 

I made the required changes based on the Porting Guide in the KBOOT reference manual but also many more since the port was not straightforward (no USB stack for K26, K65 workarounds, etc...). I still have to address the linker map to put the bootloader and application at a known location and come up with a `BOOT_PIN` alternative since my K26 board not have GPIO. But that is lower priority than getting the bootloader to run and enumerate over USB HS.

 

The source code with my changes to the Kinetis Bootloader 1.2.0 package is at https://bitbucket.org/lucasrangit/k26_kboot/branch/k26 . Please review/try it out and let me know what you think is causing the resets.

 

Thanks!

Outcomes