Hi,
question related to ROM bootloader burned into KL03.
Application enables only I2C as interface for bootloader (in BCA) and then jumps to bootloader. Will the ROM code change/reinitialise pin mux/state also for pins not used by bootloader or will leave them as they are on bootloader entry?
We are working on MKL03Z8VFG4 part number.
Thank you, Klemen
已解决! 转到解答。
Hi, Klemen,
After calling runBootloader API, device will reset itself (NVIC_SystemReset) and then boot from BootROM, so the GPIOs not touched by BootROM will be restored to default function.
Thanks,
Fan
Hi Fan,
we did a little test:
1. BCA flags were set to use I2C bus only (PTB3, PTB4), and peripheralDetectionTimeout timeout was set to 0xFFFF
2. execute application where we set muxing for pins PTA6 and PTA7 (GPIO)
3. inside application we jump to BootROM (runBootloaderAddress = **(uint32_t **)(0x1c00001c); runBootloader = (void (*)(void * arg))runBootloaderAddress; runBootloader(0);)
4. after few seconds we stop the MCU (PC is set to 0x1c000xxxx - BootROM) and pin muxing for PTA6 and PTA7 is reset to default value (DISABLED)
We have added also expression brake point to PORTA_PCR6 and PORTA_PCR7 but there are no accesses to this two register in BootROM.
Any idea?
WDT is disabled.
Klemen
Hi, Klemen,
After calling runBootloader API, device will reset itself (NVIC_SystemReset) and then boot from BootROM, so the GPIOs not touched by BootROM will be restored to default function.
Thanks,
Fan
Just a warning on this same topic. The bootloader uses the PIT (timer). Specifically, it chains the two timers together. This tripped me up; my application wasn't working properly after using the bootloader, and it was because my app uses the PIT, but the bootloader had chained the two timers together, affecting their operation.
Frank.