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.

[参考译文] MSP430FR2633:自定义波特率配置

Guru**** 2589245 points
Other Parts Discussed in Thread: MSP430FR2633

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

https://e2e.ti.com/support/microcontrollers/msp-low-power-microcontrollers-group/msp430/f/msp-low-power-microcontroller-forum/626377/msp430fr2633-custom-baud-rate-configuration

器件型号:MSP430FR2633

你(们)好

我想根据 MSP430FR2633更改电容式触控项目中的波特率

我想更改57600中的波特率(默认值为256000)。

项目内部有一个结构、我更改了时钟预分频器。

如果我将其从 UART__prescaler 更改为(UART__prescaler*2)和(UART_prescaler*4)、则波特率将分别变为128000或64000。

那么、我如何将波特率更改为57600? 在下面,您可以看到我所讨论的结构,在 TI 的 CapTIvate 项目中。

 

静态常量 tUARTPort g_UARTPort =

               .pbReceiveCallback = CAPT_UARTReceiveHandler、

               .pbErrorCallback = 0、

               .peripheralParameters.selectClockSource = EUSCI_A_UART_CLOCKSOURCE_SMCLK、

               peripheralParameters.clockPrescalar = UART__prescaler、

               peripheralParameters.firstModReg = UART_FIRST_STAGE、

               .peripheralParameters.secondModReg = UART_second_stage_MOD、

               peripheralParameters.parity = EUSCI_A_UART_NO_parity、

               peripheralParameters.msborLsbFirst = EUSCI_A_UART_LSB_FIRST、

               .peripheralParameters.numberofStopBits = EUSCI_A_UART_On_Stop_bit、

               peripheralParameters.uartMode = EUSCI_A_UART_MODE、

               peripheralParameters.oversing = UART__sarMPLING_MODE

};

提前感谢。

kr

Vincenzo

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    尊敬的 Vincenzo:

    您需要更改 UART_Definitions.h 中的 UART__sarming_mode、UART__prescaler、UART_FIRST_MOD 和 UART_second_stage_MOD 值 您可以使用用户指南(SLAU445)的第21.3.10节和表21-5或 UART 计算 器(processors.wiki.ti.com/.../USCI_UART_Baud_Rate_Gen_Mode_Selection)作为指南。

    此致、
    Ryan