AnsweredAssumed Answered

Kl27 Applicaiton Firmware upgrade from ROM bootloader

Question asked by Anil Nadargi on Sep 17, 2016
Latest reply on Jul 9, 2020 by Yilong Wang

Hi Team ,


We are working on customized board based on MKL27Z256VMP4 SOC . We are implementing firmware upgrade over USB from ROM boot-loader. Currently through below logic we are entering in ROOM code and trying to detect / enumerate USB in boot-loader mode on Host Windows PC .We were able to detect the USB on host PC for only one time . But later USB is never detected by PC even though we power cycled multiple times and run same logic to enter ROM boot-loader .


Code to enter bootloader 

void (*runBootloader)(void * arg);
uint32_t runBootloaderAddress;
// Read the function address from the ROM API tree.
//runBootloaderAddress = **(uint32_t **)(0x1c00001c);
runBootloaderAddress = **(uint32_t **)(0x1c000000);   //Tried both 0x1c00001c and 0x1c000000 address 
runBootloader = (void (*)(void * arg))runBootloaderAddress;


Also we tried to enter ROM boot-loader after reset by modifying below flash configuration in startup_MKL27Z4.S file .

.section .FlashConfig, "a"
.long 0xFFFFFFFF
.long 0xFFFFFFFF
.long 0xFFFFFFFF
.long 0xFFFFFFFE   //Tried 3D with NMI pin settings , 


Please suggest . 


Also is there any way to detect that device is executing in ROM boot-loader ?


Thanks ,

Anil N