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.

PC after PUC

Other Parts Discussed in Thread: MSP430F47176

I am investigating about reset from the software. By expiring the WDT, the MSP430 goes to PUC. Then MSP430 will restarts from the PUC. However, for only PUC without POR, following processes are not perfomed.

1. I/O pins initialization (input direction)

2. other peripheral modules and registers (e.g. SD16_A, Timer_A, etc?)

3. SR reset

4. Watch dog timer powers up.

5. PC is loaded with address in 0xFFFFE.

 

I can do items 1-3 shown above at the initial part of the main(). I do not need Item 4.

How should I treat about Item 5?

 

The MSP430 under consideration in my side will be normally connected by a battery for a long days. So POR will not occur. I need to consider reset which resembles behavior of after POR as much as possible using WDT expiration (causing PUC).

 

 

  • A PUC will initialize the processor and most of the peripherals. Just as a real power-on reset. Only a few modules are not affected. This includes the timers (unfortunaltey, even TxIE isn't reset), teh SVS, the PMM and maybe some others.

    Check the register descriptions in the family users guide. All register bits which are NOT reset by a PUC are written in brackets. If the init state of a register bit is describes as "rw-0", then a PUC will reset it to 0. If it is written as "rw(0)", then only a BOR/POR will reset it.

    On a WDT reset, your steps 1,3,4,5 are always executed after a PUC, Step 2 only partially, depending on each hardware module. There are some registers which have no init value (such as PxIN) and will keep their last value or hold a random one. But also after a true reset.

  • Thank you very much, Jens-Michael.

     

    Jens-Michael Gross said:

    A PUC will initialize the processor and most of the peripherals. Just as a real power-on reset. Only a few modules are not affected. This includes the timers (unfortunaltey, even TxIE isn't reset), teh SVS, the PMM and maybe some others.

    Check the register descriptions in the family users guide. All register bits which are NOT reset by a PUC are written in brackets. If the init state of a register bit is describes as "rw-0", then a PUC will reset it to 0. If it is written as "rw(0)", then only a BOR/POR will reset it.

    I didn't notice such kind of ("rw(0)") description. But now I see that description in the msp430f47176.pdf accodring to your advice.

    Now I can check which is not cleared by PUC.

     

    Jens-Michael Gross said:

    On a WDT reset, your steps 1,3,4,5 are always executed after a PUC, Step 2 only partially, depending on each hardware module. There are some registers which have no init value (such as PxIN) and will keep their last value or hold a random one. But also after a true reset.

    So, steps 1, 3, 4, 5 is always executed even after PUC. Then, I only need to initialize modules in step2.

    I will take care the registers, which keep last value, or random value.

     

     

  • Jens:

    A couple years ago you replied to this post by claiming that after a PUC, and only a PUC,  "the Program Counter is loaded with the address contained in the Reset Vector 0FFFEh" is a true statement.

    Do you know this by experience or by seeing it written somewhere?

  • Not “only” after a PUC. Because the different resets are chained. A BOR will always be followed by a POR and then by a PUC. And at the end of the PUC boot code, the device will either enter the BSL (if there was a POR and a BSL entry sequence) or load the PC to the value in the reset vector at 0x0FFFE. Or (if this value happens to be 0xFFFF) enter LPM4. This can be found at different locations in the users guide (except for the LPM4 thing, which was determined empirically)

**Attention** This is a public forum