Hi,
I am using two mcu in my project and need to upgrade firmware of both mcu via host application.
I am searching the feasibility and option to upgrade firmware of both mcu.
Below is the reference diagram :
Please suggest!
Thanks,
Sunil
Hello Sunil Singh:
Please tell us more about that configuration.
What is the intended application?
Will both MCUs have the same application firmware (clones) after the upgrade? Like some kind of programming chain.
What is the intended sequence for the upgrade (e.g. MCU-2 is programmed first followed by MCU-2 sending commands to MCU-1).
Regards!
Jorge Gonzalez
Hi Jorge,
Thanks for looking into this.
Both MCU not having the same application.
Below will be the sequence to upgrade firmware.
1-) First Host will send command to MCU2(KL26) for upgrade firmware and upgrade it.
2-) Then Host will send another command via MCU2(KL26) to upgrade firmware for MCU1(KL25) and it is not compulsory to upgrade every time but some time needed.
Its bit urgent for me and let me know if more inputs required.
Regards,
Sunil
Hello Sunil,
- For the first case (upgrading MCU2), there is KBOOT solution. You can take the Flash resident bootloader to upgrade the MCU with commands from the PC.
- In the second case (upgrading MCU1) you need some kind of bridge firmware. Unfortunately we not have such implementation. Maybe the closest reference are the BusPal projects in the same KBOOT installation. The BusPal acts as an interface between the host PC with a UART connection and a different bus in the target MCU (I2C, SPI or CAN). See below:
You could take that project as reference (FSL_Kinetis_Bootloader_1_2_0\apps\bus_pal), but it may not be easy to adapt it to your requirements.
Regards!
Jorge Gonzalez
Hi jorge,
I am also working in the same project with sunil.
I have another question about the bootloader.
my question is,
how can i jump to bootloader code from my application at run time?
Regards,
Ronak
Hello Ronak Panchal:
Typicaly you can do that with a function pointer (C code) or by writing directly to PC and SP registers (assembly code). See the examples in this discussion.
If your bootloader uses the default vector table at flash address 0x0, then you can take the bootloader's entry point from address 0x4.
See below an example:
#define BL_VECTORS 0x0
uint32_t run_bootloader;
...
run_bootloader = ((uint32_t*)BL_VECTORS)[1];
((void(*)(void))run_bootloader)();
Regards!
Jorge Gonzalez
Hi jorge,
I added code snippet in my application.
My application is of led blinking and after blinking LED for more than 10 times it jumps to the bootloader code.
Below are the testing scenario:
Using Kinetis updater, I uploaded led blinking application.
After successfully firmware upgradation it disconnect from the kinetis updater utility and start blinking LED as expected.
After blinking more than 10 times it stops blinking and device again connected to the kinetis updater utility as expected and seems application jumps to the bootloader successfully.
Please confirm this scenario is correct or not ?
Is there any other method to verify?
We have tested it in two scenario:
1- With Kinestis updater utility some times it doesn't re-connect with the utility.
2- Application is not running every time after jump to the bootloader.
Would you be available for the call on early next week ?
Regards,
Ronak Panchal