AnsweredAssumed Answered

Jump to ROM bootloader from application in MKL03

Question asked by Daniel Campora on Jul 6, 2020
Latest reply on Jul 8, 2020 by Daniel Campora

Hello,

 

I have a system which has several MKL03 MCUs connected by a master MPU via I2C interface. I also need to reprogram the MKL03s via I2C using the ROM bootloader. I can do this just fine when the ML03 is blank, but I'm having issues re-entering the ROM bootloader from the application. At this moment the master sends an I2C message to the MKL03 to request going into bootloader mode. The MKL03 does it by running the following:

 

        // jump to bootloader

        // Variables

        uint32_t runBootloaderAddress;

        void (*runBootloader)(void * arg);

        // Read the function address from the ROM API tree.

        runBootloaderAddress = **(uint32_t **)(0x1c00001c);

        runBootloader = (void (*)(void * arg))runBootloaderAddress;

        // Start the bootloader.

        runBootloader(NULL);

 

However it doesn't work. The application stops running, but I cannot communicate with the ROM bootloader. I'm not doing anything with the BCA but my understanding is that if the BCA is invalid, it should enable all interfaces, in the same way as it did when the flash was blank. Is this correct? What am I missing?

 

Any help is greatly appreciated.

 

Cheers,

Daniel

Outcomes