Hi RIOT devs! I’m currently working on the RIOT port for MCUBoot[1], which takes the frdm-k64f board as a reference board, and that’s also supported by RIOT and other OSs using MCUBoot.
My first goal is to provide a “bootable” image compiled in RIOT and booted by MCUBoot built for mynewt. The work is going well so far, but I’m facing a problem which was also present while coding the RIOT bootloader. Namely, the problem is that the bootloader initialises the clock to a specific speed to run the booting algorithm, which goal is to boot an OS in another flash position, an thus the clock is initialised again leading to a clock crash. Does anyone knows a “safe” way to reset the clock config to afterwards configure it to the desired speed? Currently, as the code shows for the k64f, the assumption is that the clock is in it’s default condition, which is true when a reset is triggered, but now in this new context it’s not true anymore. I have seen some examples here [2] and here [3] which I tried without success. Thanks in advance! Cheers, -- Francisco Javier Acosta Padilla Research Engineer at INRIA Saclay INFINE Team [1] https://github.com/runtimeco/mcuboot/ [2] https://github.com/apache/incubator-mynewt-core/blob/master/hw/mcu/nxp/src/ext/sdk-2.0-frdm-k64f_b160321/devices/MK64F12/drivers/fsl_clock.h#L897 [3] https://github.com/RIOT-OS/RIOT/blob/master/boards/mulle/board.c#L170
_______________________________________________ devel mailing list devel@riot-os.org https://lists.riot-os.org/mailman/listinfo/devel