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.

如何关闭msp430f2132的串口

Other Parts Discussed in Thread: CC1310

我现在的整机是:使用的mcu是msp430f2132(以下简称2312),连接串口连接mcu为CC1310的透传模块(以下简称模块)。

主要问题是,进入休眠以后,整机的功耗异常,有100uA。

我测试以下几种情况:

1、断开2312的tx与模块的rx引脚,正常初始化2132的串口,整机进入休眠后,电流为2.4uA左右。

2、正常连接2312tx与模块的rx,但不初始化2132的串口,那么进入休眠以后,整机电流为2.4uA左右。

3、正常连接2312tx与模块的rx,正常初始化2132的串口,

    a、进入休眠前,若拉高2132的tx 引脚,那么整机休眠电流为2mA;

    b、进入休眠前,若拉低2132的tx引脚,那么整机休眠电流为100uA;

    c、进入休眠前,不处理2132的tx引脚,那么整机休眠电流为2mA。

有什么方法,可以在正常初始化2132的串口后,在关闭2132的串口吗?

我初始化2132串口的代码是:

P3SEL |= 0x30;                                                          // P3.4,5 = USCI_A0 TXD/RXD
P3DIR |= BIT4;
P3DIR &= ~BIT5;
UCA0CTL1 |= UCSWRST;
UCA0CTL1 |= UCSSEL_2;                                         // SMCLK 
UCA0CTL0 = 0x00;
UCA0BR0 = 0x68;                                                      // 1MHz 9600
UCA0BR1 = 0;                                                           // 1MHz 9600 
UCA0MCTL = UCBRS1+ UCBRS0;
UCA0CTL1 &= ~UCSWRST;                                    // **Initialize USCI state machine** 

IE2 |= UCA0RXIE;
IE2 &= ~UCA0TXIE;