LPC11C24 with bootloader - How execute the code ?

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

LPC11C24 with bootloader - How execute the code ?

1,456 Views
p0ulp3
Contributor I

Hello,

I am using the bootloader included in the LPC11C24 but I cannot get the code executed once flashed.

Here is the current scenario:

- Boot in bootloader mode

- Send binary via CAN bus

- set the execution address to 0 (index 0x5070, subindex 1)

- ask for execution (index 0x1F51, subindex 1) with value 1

Replies are fine, but no execution of the program.

If I reboot the board, or power off / power on, then the program is correctly executed so the flashing seems fine, only the GO seems unworking.

What is wrong ? the address ? which one should I use ?

Regards

0 Kudos
Reply
6 Replies

1,444 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello ,

The start address index seems is [0x5070, 0]

Go (C_CAN ISP)
Write the start address into [0x5070, 0]. Then trigger the “start application” command by
writing the value 0x1 to [0x1F51, 1].

 

BR

Alice

 

0 Kudos
Reply

1,435 Views
p0ulp3
Contributor I

Hello,

Thanks for your reply. However, I already tried this and the subindex 0 (with address 0) returns a SDO CanOpen error. Only the subindex 1 is authorized.

I presume you looked into the user manual, but I think this user manual has a bug because you can also see in chapter 26.6.2 (C_CAN ISP Object directory) that the subindex 0 is not assigned.

 

I tried many address, 0x00, 0x200, 0x10a, 0x4 (those values were found in different code examples, or supposed to match with the ResetISR for example). None works, and all adresses not aligned on 4 bytes return an error CanOpen.

Any other idea or code example ?

0 Kudos
Reply

1,410 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello,

OK, could you please tell me the detail about reproduce this issue ,for example, you use which software on PC, and the steps, thanks.

 

Regards,

Alice

0 Kudos
Reply

1,403 Views
p0ulp3
Contributor I

Hello, 

I use mcu expresso, to code and flash the firmware.

The steps are the ones described in my first message:

- Boot in bootloader mode

- Send binary via CAN bus

- set the execution address to 0 (index 0x5070, subindex 1)

- ask for execution (index 0x1F51, subindex 1) with value 1

Replies are fine, but no execution of the program.

If I reboot the board, or power off / power on, then the program is correctly executed so the flashing seems fine, only the GO seems unworking.

Do you have some code example, I cannot find anything on my side. Or maybe there are some limitations of this NXP device I am not aware of ?

Regards

0 Kudos
Reply

1,392 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello,

" Send binary via CAN bus"

-> Use which software tool send ? Flash Magic?

If yes, checked "Address is start of vector table".

 

How about program a simple LED demo?

 

BR

Alice

0 Kudos
Reply

1,370 Views
p0ulp3
Contributor I

Hello,

I don't use flash magic but Python (with module python can), and I consider the python script is working (at least the part doing the flashing) because if I do a hard reset of the board, the CRC of the flash is correct and the execution is correct.

The only missing point is how to execute the code (go from the bootloader to the application). I can go from the application to the bootloader (using the IAP reinvoke function), but I cannot do the reverse and the command used in my messages above doesn't seem to work.

In flash magic, if you check "Address is start of vector table", which address is used ?

In the doc of flash magic, I see this: "If the code to be executed starts with an interrupt vector table then check the option. Flash Magic will extract the stack pointer and execution address and use them, if supported by the device."

Could I be concerned by this and how do this stack pointer and execution address extraction through the CAN ? 

Regards

0 Kudos
Reply