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.

BQ79616EVM-021: msp430fr5994 and bq79616 device maximum communication rate

Part Number: BQ79616EVM-021
Other Parts Discussed in Thread: BQ79616, MSP430FR5994

Hi,teams

    I want to use two development boards msp430fr5994 and BQ79616 for UART communication.

BQ  device  question:

    I read from the data sheet of BQ79616 that its UART baud rate is 1MHz. I have  two question for data sheet.of BQ79616

(1)Is 1M fixed? Can I set it to other baud rates?

(Note:I set the baud rate of msp430 to 9600Hz, I found that after connecting to 79616, the device cannot be addressed normally.)

(2)If the baud rate of the BQ device can be set to other values, why can’t it automatically address after I set it to 9600Hz?

msp430fr5994  launchpad  question:

 Now,I use two 430 development boards for UART communication. When the communication rate between the two boards is set to 9600Hz,

I can correctly read the value fed back from the slave and store it correctly, but when the communication rate is set to at 1MHz,

I cannot correctly read and store the value sent by the slave.

so,I want to now  MSP430 

(1)I want to know why I can't read the data correctly after the communication rate is increased?

(2)In the case of ensuring stable communication, what is the maximum communication rate of MSP430 UART

   

  • Hi Xi,

    Regarding the first question, yes BQ79616 supports only UART 1 Mbps baudrate after power on reset. 

    Regarding the second questions, you don't get response from BQ79616 if you use baud rate other than 1 Mbps for communication over UART.

    Can you please clarify what issue you are seeing when you set the baud rate of MSP430 to 1 Mbps ( Are you seeing issue between two MSP430, or between MSP430 and BQ device ), can you please share the logic analyzer logs or the scope shots of the UART communication. Also can you please share what configuration changes you have done for MSP430 to update the baud rate from 9600 to 1Mhz.

    From MSP430 datasheet, I see it supports baud rate up to 4Mhz.

    Regards,

    Ravi

  • Hi, Ravi

    Thanks for your quick response.i'm sorry i didn't make it clear.

    When the communication rate between msp430 and BQ device is 1MHz, the data sent by BQ is correct, but the data received by 430 is incomplete. I suspect that the baud rate is too high, so I use two 430 development boards to simulate the communication process, and configure the baud rate of both boards to 1MHz to see if data can be sent and received normally. I found that when the baud rate of the two boards is configured as 1MHz, the slave in the two 430 boards cannot receive data normally, but when I configure the baud rate of both boards as 9600, the slave can receive to complete data.

    (1)So I experimented with two 430 boards (9600 to 1M)

    communication process:

    Now, Two MSP430, one as master and one as slave.The master sends a command to tell the slave, after the slave receives the command, the slave sends the value in the array to master.   temp1[8] = {0x01,0x00,0x05,0x68,0x17,0x97,0xce,0x84}  ; Then observe the value received by the host

      (2)  The communication rate between two msp430 is 1M, and the captured oscilloscope waveform.

    MSP430 slave  send right data.The data analysis results in the figure are {0x01,0x00,0x05,0x68,0x17,0x97,0xce,0x84} ,but  the data received by the code is incomplete

     (3)  The communication rate between two msp430 is 9600, and the captured oscilloscope waveform.

    MSP430 slave  send right data.The data analysis results in the figure are {0x01,0x00,0x05,0x68,0x17,0x97,0xce,0x84} ,and  the data received by the code is complete

    (4) The baud rate is changed from 9600 to 1M. The changes in my code are as follows

    master code:

    CS_setDCOFreq(CS_DCORSEL_1, CS_DCOFSEL_4);//DCO:16m

    CS_initClockSignal(CS_SMCLK,CS_DCOCLK_SELECT,CS_CLOCK_DIVIDER_2 );//CS_SMCLK:8m
    CS_initClockSignal(CS_MCLK,CS_DCOCLK_SELECT,CS_CLOCK_DIVIDER_1);

    before:

    void BMS_UARTA3_Init(void) 
    {

    P6SEL0 =( BIT0 | BIT1);
    P6SEL1 = 0x00;
    P6OUT |= BIT0 ;
    P6DIR |= BIT0 ;
    P6DIR &= ~BIT1;
    PM5CTL0 &= ~LOCKLPM5;//使IO口生效

    UCA3CTLW0 = UCMODE_0 +UCSSEL_2 +UCSWRST; //baud rate =1M
     UCA3BRW_H = 0 ;
     UCA3BRW_L = 8 ;
     UCA3MCTLW_H = 0X0 ;
     UCA3CTLW0 &= ~UCSWRST ;
    UCA3IE |= UCRXIE ;
    }

    after: 

    void BMS_UARTA3_Init(void) 
    {

    P6SEL0 =( BIT0 | BIT1);
    P6SEL1 = 0x00;
    P6OUT |= BIT0 ;
    P6DIR |= BIT0 ;
    P6DIR &= ~BIT1;
    PM5CTL0 &= ~LOCKLPM5;

    UCA3CTLW0 = UCMODE_0 +UCSSEL_2 +UCSWRST; //baud rate =9600
    UCA3BRW_H = 0 ;
    UCA3BRW_L = 52 ;
    UCA3MCTLW_L = UCOS16 + UCBRF0;
    UCA3MCTLW_H = 0X49 ;
    UCA3CTLW0 &= ~UCSWRST ;
    UCA3IE |= UCRXIE ;

    }

    slave code

    CS_setDCOFreq(CS_DCORSEL_1, CS_DCOFSEL_4);//DCO:16m

    CS_initClockSignal(CS_SMCLK,CS_DCOCLK_SELECT,CS_CLOCK_DIVIDER_2 );//CS_SMCLK:8m
    CS_initClockSignal(CS_MCLK,CS_DCOCLK_SELECT,CS_CLOCK_DIVIDER_1);

    before

    void BMS_UARTA3_Init(void) 
    {

    P6SEL0 =( BIT0 | BIT1);
    P6SEL1 = 0x00;
    P6OUT = (BIT0 |BIT1);
    P6DIR |= BIT0 ;
    P6DIR &= ~BIT1;
    P6REN |= BIT1;
    PM5CTL0 &= ~LOCKLPM5;//使IO口生效


    UCA3CTLW0 = UCMODE_0 +UCSSEL_2 +UCSWRST; // baud rate =1M
    UCA3BRW_H = 0 ;
    UCA3BRW_L = 8 ;
    UCA3MCTLW_H = 0X0 ;
    UCA3CTLW0 &= ~UCSWRST ;
    UCA3IE |= UCRXIE ;

    after

    void BMS_UARTA3_Init(void) 
    {

    P6SEL0 =( BIT0 | BIT1);
    P6SEL1 = 0x00;
    P6OUT |= BIT0 ;
    P6DIR |= BIT0 ;
    P6DIR &= ~BIT1;

    PM5CTL0 &= ~LOCKLPM5;//使IO口生效

    UCA3CTLW0 = UCMODE_0 +UCSSEL_2 +UCSWRST; //baud rate =9600
    UCA3BRW_H = 0 ;
    UCA3BRW_L = 52 ;
    UCA3MCTLW_L = UCOS16 + UCBRF0;
    UCA3MCTLW_H = 0X49 ;
    UCA3CTLW0 &= ~UCSWRST ;
    UCA3IE |= UCRXIE ;

    }

    I will privately send you other necessary codes.If you have any other information you need, please contact me in time, I can also send it privately

    Can that help me see where the problem is?