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.

msp430f6779 vector table problem??

Other Parts Discussed in Thread: MSP430F6779

Hi ,

I have a problem with vector table of msp430f6779. Here is my project:

Now this MCU has a 4 flash banks. My code resides in second flash banks which starts 2C000h and ends 4BFFFh addresses. As you can see this addresses in 20 bit format. So my code has some interrupts too. And interrupt vector table starts FF80h and ends FFFFh addresses. So as you can see this is 16 bit format. So ıf I use and interrupt in my code which resides second bank, my interrupt routine function will be reside first bank.Because of vector table size.

I want to move routine functions to second bank too. How can I do that? How can I implement that?

Best regards..

  • The design of the MSP430 limits the placement of interrupt routines to the first 64K of the application, since the entries in the interrupt table are only 16 bit wide.

    However, you can populate the table with pointers to stubs, which does nothing else than jumping to your routines, which you can place anywhere. Of course, in addition to the interrupt vector table, you will need a second table of entries containing jump. Unfortunately, the compiler will not generate such table, so you would have to write one for yourself in assembler.

    Remember that the functions that you jump to also muse be defined using the __interrupt keyword to ensure that they end with a RETI.

    Also, remember that all your interrupts will be somewhat slower, as you will need to execute an extra jump.

        -- Anders Lindgren, IAR Systems, Author of the IAR compiler for MSP430

  • Thanks Anders, this information might help me.

    Best Regards..

  • Creating the stubs isn’t simple. It can be done in C but is easier in assembly. Also, assigning the real interrupt vectors to the stubs is even more difficult.
    Maybe it will work with inline assembly. Creating an ISR that is assigned to a vector and then contains a simple inline assembly command that does the jump. (note: it must be a jump, not a function call, or you’ll waste time and also cannot exit LPM from the called function)

     The topic of proxy interrupt tables has been discussed many time sin this forum. Search for “Proxy vector table” or “custom BSL” (where it is usually used)

**Attention** This is a public forum