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.

Software BOR event does not reset all peripherals modules

Other Parts Discussed in Thread: MSP430F5510

Hello,

I have a problem to make a software reset on a MSP430F5510. I'm working with CCS 5.

To force my controller to reset , I use the following line:

PMMCTL0|= PMMSWBOR;

The program restarts to the begining, but it doesn't reset the peripherals to their initial values. For exemple, my ADC10 registers keep the values before the reset.

With a reset-button on RST/NMI pin it works, and with the software reset in CCS debugger it restart and reset all values to...

Is there a way to make a software reset that initialize the peripherals? I've tried with a Watchdog event and a POR but the result is the same..

Thanks in advance! 

  • As you go through the User Guide, make note of the difference between POR and PUC (Power-Up-Clear, I think). The former clears most everything, but generally only happens with a hardware reset (BOR may not be included in this, check the UG). The latter happens with the other resets, and leaves many things (notably ADC) active. The device registers should note POR vs PUC in their "reset" values.

    I haven't found a way to trigger a "hardware" reset with pure software, but I haven't looked very hard. I grew up on processors where "branch to location 0" (not particularly difficult to do by accident) looked rather like a Reset, but didn't reset anything. Thus I try to write drivers which don't rely on this, by e.g. forcing the exact register values I want rather than wiggling bits based on the Reset values.

    The 430 ADC10 is a particular headache, since it may be in a state where you can't just assign values without pounding on it a bit.

  • RHorta said:
    PMMCTL0|= PMMSWBOR;

    This line won't cause a BOR, it will cause a security violation and therefore a PUC. To generate a BOR or POR, you should add the PMM password :)

    PMMCTL0 = PMMPW|PMMSWBOR;

    Note that the password is read as 0c96 but must be written as 0xa5. So an |= operation will read and write back the wrong password. This is intentional.

  • Thanks for your answer! it works

**Attention** This is a public forum