KL03 Bootloader Not Executing Commands

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

KL03 Bootloader Not Executing Commands

726 Views
rmps
Contributor I

I am using a KL03Z32M4 and need to perform certain operations requested via kblhost utility over I2C.

The bootloader version is 1.0.0 .

I've configured the BCA as follows:

BCA = {0x6766636B, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x88135002}; //I2C slave (0x50),5000ms timeout

and the FlashConfig:

Flash_Config = {0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFF37FE};

Some commands work fine (get-property, flash-erase, flash-image..) but I need to able to send a software reset to the MCU. I tried the kblhost reset command but get no result (although bytes exchanged between host and target comply with the protocol). I also tried to force a reset by using the execute command and supplying the starting address of the reset vector and initial stack pointer but with no result.

I attached via external debugger and noticed the bootloader enters the following loop, which never exits:

1c001924:   ldr     r1, [r3, #48]   ; 0x30
1c001926:   cmp     r1, r2
1c001928:   bne.n   0x1c001924

According to the KL03 family manual both reset and execute instructions are supported. Am I missing something? I could not find bootloader v1.0.0 manual or source code anywhere. Is it possibile there is a bug in the bootloader itself?
Any help is greatly appreciated.

0 Kudos
2 Replies

648 Views
rmps
Contributor I

Addendum:

If attached with my debugger the following procedure works in order to reset the MCU:

1) send the execute command with ResetISR starting address and initial stack pointer;

2) send ANY blhost command (for eg. get-property).

I set a breakpoint at the start of ResetISR to make sure the MCU effectively gets to it.

Why doesn't the procedure work when debugger is detached?

And why do I need to send the second command in order for the first to execute? Is this a limitation of bootloader v1.0?

0 Kudos

648 Views
Sabina_Bruce
NXP Employee
NXP Employee

Hello,

Are you getting a return message from the blhost command? If so, what kind of failure message are you getting.

If possible, could you update to the latest version? Does it result the same?

Best Regards,

Sabina

0 Kudos