KL03 pin reinitialisation in bootloader

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

KL03 pin reinitialisation in bootloader

ソリューションへジャンプ
3,455件の閲覧回数
kporenta
Contributor III

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

ラベル(1)
0 件の賞賛
返信
1 解決策
2,983件の閲覧回数
ramboyang
NXP Employee
NXP Employee

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

元の投稿で解決策を見る

7 返答(返信)
2,983件の閲覧回数
ramboyang
NXP Employee
NXP Employee

Hi Klemen,

Only the pins of enabled peirpherals are re-initialized in BootROM, the other pinmux of toher pin is the same with the state out of reset.

Best Regards,

Fan

0 件の賞賛
返信
2,983件の閲覧回数
kporenta
Contributor III

Hi Fan,

thank you for quick reply.

Is there a way to force BootROM not to change unused pins to out of reset state. In other word, leave them as they are before entering BootROM?

Klemen

0 件の賞賛
返信
2,983件の閲覧回数
ramboyang
NXP Employee
NXP Employee

Hi Klemen,

Actually, BootROM doesn't change any unused pins, but I am not sure if the the pin mux would be restored to default state after reset.

0 件の賞賛
返信
2,983件の閲覧回数
kporenta
Contributor III

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

0 件の賞賛
返信
2,984件の閲覧回数
ramboyang
NXP Employee
NXP Employee

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

2,983件の閲覧回数
kporenta
Contributor III

Hi Fan,

that explains everything.

Klemen

0 件の賞賛
返信
2,983件の閲覧回数
frankvanhooft
Contributor III

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.

www.frankvh.com

0 件の賞賛
返信