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.

MSP430F149: Resetting the micro while reset vector is 0xFFFF

Part Number: MSP430F149

Hi,

We are using MSP430F149 and have a question on that.

We would like to know what will happen if the reset vector is erased (0xFFFF) and we reset the microcontroller.

What will be the corresponding assembly instruction for the 0xFFFF ?

Will PC be roll-over to 0x00 after that?

  • The F2 User Guide (SLAU144J sec. 2.1.2) explicitly says that the "device will be disabled" in this case. I think this is roughly equivalent to a disabled LPM.

    I wasn't able to find a corresponding statement in the F1 User Guide (SLAU049F) but I suspect it does the same thing.
  • As Bruce said, it is likely that the boot code will detect this and force the CPU to go to sleep.

    But if it doesn't, the bytes FF FF will be interpreted as ADD.B @R15+,X(R15), where X are the contents of the following word; after wrapping around, this is the IE1 register at address 0000. (Later families are documented to reset when trying to execute inside the I/O range.)
  • Hi Pradeep,

    there are indeed differences between the different MSP430 families so let me give the statement specifically for the MSP430F149 (and general MSP430F1xx devices):
    - The MSP430F1xx family hasn't yet implemented the boot code which would detect that the Reset vector has been erased.
    - Instead, as Clemens assumed, the CPU will interpret the 0xFFFF as instruction and execute it accordingly.
    - After that the PC would overflow and start again at 0x0000. The MSP430F1xx family hasn't yet implemented a reset in case the PC tries to execute inside the I/O range, that means that the CPU will interpret the data in that range as instructions and it's pretty much unpredictable what happens. This will go on until the watchdog reset the device (WDT is default on after a reset).
    - You pretty much need to re-program the device and correct the reset vector in that case, if not the whole scenario just repeats.

    Best regards,
    Britta
  • Knowing beats guessing. Thank you.
  • Thanks Britta.
    Our observation is - we have one device from field having reset vector 0xFFFF.
    Each time I read the MSP430F149 flash image (using elprotonics FlashPro430), I observe different data being read each time from one particular sector ( 0xF200-0xF3FF ).
    As you mentioned "it's pretty much unpredictable what happens", would this unpredictable behaviour writes someting always in one particular sector of flash ?
  • Hi Pradeep,

    what meant with "unpredictable" is that it's hard to say how the CPU interprets the data written in 0x0000 and following. But yes, I'd suspect it to always interpret it the same way if the data doesn't change.
    In case it's interpreting a write operation to a certain location that would describe what you're seeing.

    Best regards,
    Britta
  • Hi Pradeep,

    as I didn't hear back from you on this thread I assume that your issue has been solved in the meantime.
    Note that I will close this thread. Please reply back in case further assistance is needed.

    Best regards,
    Britta

**Attention** This is a public forum