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.

[参考译文] MSP432P401M:MSP432 TI-RTOS演示uartecho将波特率设置为4800。

Guru**** 2587365 points


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

https://e2e.ti.com/support/microcontrollers/msp-low-power-microcontrollers-group/msp430/f/msp-low-power-microcontroller-forum/620273/msp432p401m-msp432-ti-rtos-demo-uartecho-set-baudrate-to-4800

部件号:MSP432P401M

你好,冠军,

我测试了MSP430 TI驱动程序示例“uartecho_MSP_EXP432P401R_TIrtos_CCS”, 我将波特率更改为96.001152亿都可以工作,但当我将其更改为4800时,它无法工作,您知道我应该做的其它设置吗?

我改变了  

uartParams.writeDataMode = UART_DATA_binary;
uartParams.readDataMode = UART_DATA_binary;
uartParams.readReturnMode = UART_RETURE_FULL;
uartParams.readEcho = UART_ECHO_OFF;
uartParams.baudrate = 4800;

在"mainThread"中,我的客户想要使用4800波特率。

谢谢!

巴西

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

    您好,Joe,

     您还需要在 MSP_EXP432P401R.C.中的UARTMSP432_BaudrateConfig中添加一个新条目(4800) 例如,我添加了两个条目,一个用于24MHz,另一个用于12MHz

    /*
    *波特率分压器是通过使用MSP432波特率
    *计算器
    * software-dl.ti.com/.../index.html
    */
    const UARTMSP432_BaudrateConfig uartMSP432Baudrate[]={
    /*{baudrate,输入时钟, prescalar, UCBRFx, UCBRSx, Oversampling}*
    {
    .outputBaudrate = 11.52万,
    .inputClockFreq = 2400万,
    .prescalar = 13,
    .hwRegUCBRFx =0,
    .hwRegUCBRSx = 37,
    超额采样= 1
    },
    {11.52万,12000000,6,8,32, 1},
    {11.52万,6000000,3,4,2, 1},
    {11.52万,3000000,1,10,0, 1},
    {960.024万2400.0156万,4,0, 1},
    {960.012万1200万,78,2,0, 1},
    {9600,6000000,39,1,0, 1},
    {9600,3000000,19,8,85, 1},
    {9600,32768, 3,0146,0},
    {480.024万2400.0312万,8,0, 1},
    {480.012万1200.0156万,4,0, 1},
    }; 

    希望这能有所帮助。

     David