This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Reset after success remote update

Hi All,

I managed to update my FW, but the new FW is not start to work.

I checked that the new FW is burn correctly (I verify it with uVision3 with the verify option at the utility settings).

Please advice Kobi

  • You managed to update your fw. If the verify passed, then you know that the copy operation worked.

    But that isn't a guarantee that the firmware you downloaded is correct. If you download a buggy firmware, your board may fail to start.

    In this case you are not supplying any information at all that can help us help you with your problem.

    We don't know what equipment you have updated. We don't know what the old firmware was. We don't know what the new firmware is. We don't know if it is an application that you have written/modified, or if it is a demo application.

    We don't know what indications you are looking at to deduce that the firmware doesn't run now but did run before the update.

  • Hi,

    I am using uVision 3 with ulink2 and the target is in house development. The new FW is a simple one that sends string to the UART (It is working with direct download using ULINK2). I verified that the new FW image is identical to the original with the help of ULINK2 and uVision3 (Option for target --> utilities --> settings --> verify).

    And after reset, I notice that the controller (LPC2136) do not return from the internal bootloader.

    I hope I supply enough information (If not I will add more).

    Thanks Kobi

  • A bootloader you have written, or the NXP bootloader built into the chip?

    The NXP boot loader checksums your interrupt vector table before deciding if there is a program to start. If the checksum is wrong, and you haven't activated any code-protection features, then the built-in boot loader will just sit and wait for a download program to connect and start sending commands.

  • Hi,

    This is NXP internal bootloader

    TNX Kobi

  • Hi,

    It looks that the bootloader is in endless loop.

    I checked with ULINK2 that it is my new FW, so why it is do not copy the VIC to address 0 and start the new program?

    TNX Kobi

  • Hi,

    As I wrote before, I managed to burn my new FW instead of the old one, but the new FW is not restarts.
    I checked That the new FW is correct (Validate it with ULINK2). As far as I understand, the bootloader checks if the program signature is valid.
    My new FW is stuck at the LPC bootloader and do not run the new FW(probably because the program signature is wrong).

    Is the program signature is included with the INTEL hex file?
    If no, how do I updates it?

    Please advice Kobi

  • The Keil tools will automagically create a checksum for the interrupt vector table. As long as you download that address range, the NXP boot loader should be able to sum all vectors and get a total of zero. This indicates that there is an application loaded, and the NXP boot loader will then start your firmware.

    If your download doesn't contain the interrupt vector table - or downloads it to the wrong address - the NXP boot loader will (as intended) wait in an infinite loop for anyone to connect on the monitor port and feed it a new firmware.

  • Hi,

    I am downloading the INTEL hex file without the JTAG.

    From my understanding, the bootloader suppose to copying the interrupt vectors to address 0x0000.

    I think that the INTEL HEX file do not contains the bootloader.

    Is there any one that succeeded to update his FW that worked in the way that I am trying?
    If yes How?
    Is this the right way to do so? If not, what is the right way?

    Please advice Kobi

  • hi can you make elf files with the uvision?

  • No, the hex file does not contain the NXP boot loader.

    Note that the NXP boot loader has its interrupt vector remapped to the start of the first flash sector, so blank-checking of comparing of the first 64 bytes of this sector using the ISP/IAP commands will fail.

  • Hi,

    I know that it is not contain the interrupt vector. The question is, why the new FW does not copy the vector interrupt to address 0x0000.

    Is it the problem with the program signature? And how can I resolve it?

    Kobi

  • How do you know that the new FW does not contain the interrupt vector table?

  • Hi,

    Finally, it is working!

    The problem was that HEX file do not contains the program signature. I calculated the program signature and added it to the HEX file and it is working.

    Thanks for the help

    Kobi

  • I am happy to know that you solve the problem.
    Actually, I got the similar problem. Hope that you can share your experience to me.

    Well, I also try to use IAP to update my firmware on LPC2103. The system will connect with another main board via UART. Main board is master to send the updated firmware to LPC2103.
    Original, my idea is separate LPC2103 firmware as two parts; system base and application. The system base will locate at sector 0 with UART function and boot (ie. startup.s). And the application will locate at the remainder 3 sectors. When I want to update firmware, close the application and jump back to system base to receive updated code into RAM via UART. Re-warite the application and try to reboot. The whole system crash. After compare the on-chip ROM code with the new updated code found the system base is different. I did fix the application entry by use __at commend. Unfortunately, the system base can not be fixed. I found the KEIL will increase some object code which maybe my application use new function in it. Could you understand my problem?
    Here is my scatter file to separate the system base and application. Maybe you can help to solve it.

    =======================================
    LR_IROM1 0x00000000 { ; load region ER_IROM1 0x00000000 0x00001000 { ; load address = execution address *.o (RESET, +First) main.o (+RO) iap.o (+RO) uart.o (+RO) *(InRoot$$Sections) .ANY (+RO) } RW_IRAM1 0x40000000 0x00001000 { ; RW data .ANY (+RW +ZI) }
    }

    LR_IROM2 0x00001000 0x00003000 { ER_IROM2 0x00001000 0x00003000 { ; load address = execution address menupage.o (+RO) key.o (+RO) lcdDisplay.o (+RO) Ultrasonic.o (+RO) Diagnostic.o (+RO) led.o (+RO) app_main.o (+RO) utility.o (+RO) NormalUart.o (+RO) lcd.o (+RO)

    ;.ANY (+RO) }
    } ==============================

    Kindly, please advice.

    Thanks,
    Dennis

  • Hi Dennis,

    Try to look for the program checksum.

    At address 0x14 at the startup code, the FLASH device (ULINK2) add the program cs.

    Basically, if you downloaded new FW, the cs was changed and the startup code has the old cs.

    I changed all my application include the startup code.
    (I had to add the CS value to the HEX file with additional external application, the Philips old version of ISP).

    Regards Kobi