This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

How to Overwrite Interrupt Vectors for MSP430F5438A?

Hello ,

I have developed a custom bootloader which uses no interrupts but the application to be flashed uses interrupts. Using the bootloader i am able to flash the application but Interrupt vectors never gets overwritten with the new set of values.

I have seen TI BSL and it uses BSL area with a modified linker script. But can't we have a bootloader in non BSL area? 

In simplest way how can we overwrite the Interrupt vectors ?  Did Anybody tried this or any examples on that would be appreciated.

  • Interrupt vectors are part of the Flash sector at 0x0FE00-0x0FFFF. For the Flash controller, there is nothing special about this sector. If the interrupt vectors did not get overwritten, it is probably because your bootloader did not write them.
  • I found this on Ti WIki:


    General Custom BSL FAQ
    What happens with erasure of the vector table? Is it considered one separate 64-byte segment (for purposes of erasure) or is it considered a part of the upper-most 512 byte “segment” of the lower 64KB memory? Next, may individual vectors be re-written?
    A: The vector table is not a separate segment. It is considered in the uppermost 512-byte segment and is not 'protected' from erasure during a mass-erase, for example. Individual vectors may be re-written, but only if the whole segment is erased first.



    It says " Individual vectors may be re-written, but only if the whole segment is erased first." Is that true?
  • Also I am able to write 67Kb of hex file properly with out missing a single byte but only interrupt vectors are not getting updated.

    And following is the part of hex file which has interrupt vectors and not get updated -

    :10FFD00022932293ECCF2293229322932293229373
    :10FFE00000C2B2CDAAAD22932293D2D3A0D4229341
    :10FFF0002293D49432D9DEB0269322932293B092E6
    :04000003000092B0B7
    :00000001FF

    Bootloader is able to flash till FFDO but nothing after that.

    Any inputs there?
  • You are talking about the Bootloader you wrote. R ight?

    I have never seen it. I do not know how it writes 67 kb of hex file correctly and why it does not write beyond 0xFFD0.

    May be your Bootloader can only write into consecutive locations of the Flash and cannot skip/switch to a different location to write other bytes there.

    Does you Bootloader use a pointer to decide where to write? If so, is that pointer changed to point to 0xFFD0 and beyond?
  • Bootloader works fine , I found out the solution , Before programming the vector addresses you need to Erase them. When i did the erase it worked like a charm.

    I still have to test my bootloader , logically it should work as every byte is at its designated place now.



    Thanks for your help.

**Attention** This is a public forum