MSP430 serial communication failing in cold weather
Which MSP430 are you using? The different families have different clock structures and capabilities.
The DCO will change frequency with temperature causing the USART baud rate to drift out of specification. The MSP has a temperature sensor (not very accurate). You can change the values in the DCO control registers to bring the DCO frequency back in range but this would require calibrated lookup tables covering the range of temperatures that you expect to see. Some of the MSP devices have DCO calibration tables programmed into one of the flash sectors at manufacture but these are only useful if they cover the frequency that you wish to use, and I do not think that they have temperature compensation values.
Do you have a reference crystal oscillator that you could use as a calibration source? I would always design in a 32kHz crystal and use this on the ACLK. For baud rates up to 9600 this can be used directly. For higher baud rates you will have to calibrate the DCO against the ACLK signal. The newer parts have a hardware FLL that will do this automatically.
So here's the answer:
The product has a 32 kHz crystal, and I had coded a routine to adjust the DCO frequency. The frequency adjustment used two timers, one from DCO and one from the 32kHz ACLK. It was driven by an interrupt off of capture/compare system, so that it could periodically recalibrate itself during operation.
Unfortunately, I inserted the initial calibration in the wrong part of my startup code, where interrupts were turned off. Therefore calibration didn't happen before the first use of the serial port, and initialization would hang waiting for a response on the serial port.
The DCO frequency starts at the factory calibrated value, which is why it was working at room temperature.
These plots tell the story:
First, the DCO-temperature curve:
Now the curve after calibration is actually working:
The low temperatures caused the DCO frequency to rise enough to cause the UART baud rate to rise too high? You measured the temperature and then compensated the oscillator in software?