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 reset problem in msp430

Other Parts Discussed in Thread: MSP430F5419A, MSP430F5438A, MSP430F5419

Dear All,

I have a very strange issue.

Actually i wanted to shift baud rate from one speed to another in single program i was facing some problems so i used watchdog timer to reset (software reset) by WDTCTL = 0.

But what i observed when i do it frequently my DO behaves randomly.

If at all i give it a command to on or off they don't get on or off.

Can anybody please suggest me some solution.

Regards.

  • Hi,

    which device are you using? The serial module of MSP430 usually has a software reset bit (e.g. UCSWRST of UCx0CTL1 register in USCI module) which needs to be set before you are able to re-configure the serial module like changing the baud rate etc.

    Anyway, I am not sure what you meant with DO:

    Pallav Gandhi said:

    But what i observed when i do it frequently my DO behaves randomly.

    could you please explain?

  • I am using MSP430F5438A and in some cases MSP430F5419A.

    And DO means Digital output. Actually my I/O pins do not get on off some times.

  • And for my MSP430F5419 i have used following command

    P3SEL = 0x30;                             // P3.4,5 = USCI_A0 TXD/RXD
             UCA0CTL1 |= UCSWRST;                      // **Put state machine in reset**

    After which i change values but still problem occurs in code.

  • Hi,

    when you reset the device (e.g. using WDT as you described above), the GPIO setting is reset back to input, and that is probably why you are seeing some issue on your digital output pin (as it is switched back to input for sometime after reset before your code setting it back as output).

    I would suggest you to try using the reset bit as described above to do reconfiguration of your UART module.

  • WDTCTL=0 causes a password violation error and resets the MSP with a PUC.
    However, at a PUC, not all modules are initialized. Especially the timers are totally unaffected by a PUC. Even their interrupts are still enabled (but won’t call an ISR as long as GIE is still clear, which it is after a PUC)

**Attention** This is a public forum