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.

[参考译文] MSP430F47197:MSP430F47197上的波特率设置有问题

Guru**** 1825110 points
Other Parts Discussed in Thread: MSP430F47127
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/msp-low-power-microcontrollers-group/msp430/f/msp-low-power-microcontroller-forum/669790/msp430f47197-problem-in-baud-rate-setting-on-msp430f47197

器件型号:MSP430F47197
主题中讨论的其他器件:MSP430F47127

尊敬的所有人:

我尝试在 MSP430F47127上设置波特率、但遇到了问题。

时钟=   4194304

SCFI0 = FLLD_4+FN_4;  
SCFQCTL = 31;          //(31+1)* 32768 * 4 = 4194304

 

我尝试将波特率设置为9600   

P1SEL |= BIT6+BIT7;          //   P1.6、7 = USCI_A1 RXD/TXD
UCA1CTL1 |= UCSSEL_2;      //   CLK = SMCLK

UCA1BR0 = 0xB4;
UCA1BR1 = 0x01;
UCA1MCTL = 0xDF;

UCA1CTL1 &=~UCSWRST;  // 初始化 USCI 状态机
UC1IE |= UCA1RXIE;        // 启用 USCI_A0 RX 中断

但它不起作用。

我还尝试了:

P1SEL |= BIT6+BIT7;          //   P1.6、7 = USCI_A1 RXD/TXD

UCA1CTL1 |= UCSSEL_1;      //   CLK = ACLK

UCA1BR0 = 0x03;
UCA1BR1 = 0x00;
UCA1MCTL = 0x29;

UCA1CTL1 &=~UCSWRST;  // 初始化 USCI 状态机
UC1IE |= UCA1RXIE;        // 启用 USCI_A0 RX 中断

 但不幸的是、它也不起作用。

但是、当我尝试设置为19200波特率时、它起作用。

P1SEL |= BIT6+BIT7;                //  P1.6、7 = USCI_A1 RXD/TXD
UCA1CTL1 |= UCSSEL_2;            // CLK = SMCLK UCSSEL_2

UCA1BR0 = 0xDA;
UCA1BR1 = 0x00;
UCA1MCTL = 0xAA;

UCA1CTL1 &=~UCSWRST;          // 初始化 USCI 状态机
UC1IE |= UCA1RXIE;               // 启用 USCI_A0 RX 中断

但我需要将其设置为9600波特率。 请帮助。

 


提前感谢。