Electronic – MSP430 serial communication failing in cold weather

baudratemsp430serialtemperature

I have a product using the MSP430 microprocessor, which has been selling for a couple years now. One of the MSP430's jobs is to communicate over async serial to a low-power radio.

With the onset of this winter, there has been an unacceptable failure rate (several percent) in cold temperature. Investigation has found that the serial communication with the radio is failing. The baudrate generator for the serial port is fed by SMCLK, which is divided from the MSP430's digitally-controlled oscillator (DCO).

Why is serial communication failing at low temperatures?

(Note: I have already solved the problem and will be posting the answer soon. Hint: it was a software bug.)

Best Answer

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.