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.

Bootloader/Flash monitor Interrupt vectors

Other Parts Discussed in Thread: MSP430F5419A

Hello,

I've adapted the code from app note SLAA341 to CCS v5.5 and made my own bootloader. It is working very well, except for programs that have interrupts.

I've made some debug with blinking leds to see where the problem is, and find out that when I set the GIE, the program stops. Since the WD is running after a few moments the msp resets, the bootloader starts, the control is transferred to the main program and it stops again.

My guess is that the interrupt vectors aren't configured correctly, but I can't figure out why.

Attached are my bootloader main file and the linker file. I am using a msp430F5419a.

Can anyone help me?

Thanks,

Pedro

8244.Files.rar

  • In your linker script, I see that you are putting all code, including the C init code of the application, into the MONITOR segment. Nothing is put into the remaining flash.

    So apparently, the application isn't linked by the same linker script. Did you change it properly too, so that the interrupt vectors end up at 0xD780?
    Now your boot loader moves #APP_START into PC to start the app. Where does it point to? Why don't you do
    MOV &0xD7FE, PC (which would call the application reset vector, if all is well) or do a JMP &USER_RESET?

    Maybe your app is only starting because you use the APP_START instead of using the (intended) application reset vector. And you app doesn't store the vectors where your monitor expects them.

    With the info you posted, I can't eliminate this possibility, because I don't know what APP_START is.

  • Hello Jean-Micheal,

    Thanks for your reply.

    APP_START is defined in another file as

    #define APP_START 0xD7FE.

    The application linker script is different from the the one used for bootloader. It is attached, can you check it, please?

    Thanks,

    Pedro

  • I don't see anything wrong in the other linker script too. Doesn't mean there isn't something wrong. I'm not that expert. But it looks right as far as I can tell.

    One thing that could be wrong: do you use same code/data model type for both projects?

  • Hello Jean-Micheal,

    I've found the bug yesterday. I wasn't disabling the timer interrupt correctly. In my application that interrupt wasn't configured, so it was looping in the interrupt because I didn't clear the interrupt flag.

    Thanks for your help!

**Attention** This is a public forum