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.

MSP430FR5994: How does msp430 store a string of response frames from BQ79616

Part Number: MSP430FR5994
Other Parts Discussed in Thread: BQ79616

Hi,teams:

   I use  msp430fr5994  launchpad  and  BQ79616EVM device  to  accomplish  UART  communication.

Now,I received a bunch of response frames from BQ79616.

The response frame is as follows:

01  00  05  68  17  97  CE  84  (The data I read with an oscilloscope)

I read 00  68  97  84  in UCA3RXBUF_L  

All I read in UCA3RXBUF_H is 0 

I read 01  05  17  CE in UCA3RXBUF

What is the difference between 8-bit storage and 16-bit storage?Why 8-bit storage high 8-bit values are all 0?My UART data length is configured as 8-bit data

How is this series of response frames stored in the UCA3RXBUFunder the two modes of 8-bit storage and 16-bit storage?

I look forward to your reply.

Please contact me as soon as possible

  • The _L and _H symbols are just the lower and upper byte of the 16 bit register. Only the lower byte is used: The upper byte always reads as zero.

  • Now,In the UART interrupt, I defined an array named  temp1[38], the data type is uint8_t . 

    (1) When I execute the following two lines of code

    temp1[i] = UCA3RXBUF_H;
    temp1[i+1] = UCA3RXBUF_L;

    The result is as  follow,That is, the high 8 bytes are all 0.“Only the lower byte is used: The upper byte always reads as zero.” What you mean by this sentence is that when UCA3RXBUF_H and UCA3RXBUF_L are used in the code at the same time, UCA3RXBUF_H will always be 0,right?

    /resized-image/__size/320x240/__key/communityserver-discussions-components-files/166/pastedimage1677722591786v1.png

    (2) When I execute the following two lines of code

    temp1[i] = UCA3RXBUF;//(Note that UCA3RXBUF is a 16-bit value,I now want to assign                                                 //UCA3RXBUF to an 8-bit array)
    temp1[i+1] = UCA3RXBUF_L;

    The result can be stored as I preset.

    But I want to ask, assigning a 16-bit variable to an 8-bit variable, generally the lower 8 bits are aligned, so it is equivalent to assigning the 16-bit lower byte to an array.

    So I think “temp1[i] = UCA3RXBUF” and “temp1[i+1] = UCA3RXBUF_L ”are actually equivalent, why are the results different?

  • Your results tell me that your ISR is wrong. How it is wrong I can't say since you haven't included the whole thing.

  • I think maybe the data sent by BQ79616 needs to be parsed in a specific format. I may have a problem with the timing. I will check whether this part has timing requirements. Thank you very much. I will contact you if necessary. Thank you for your quick response.

**Attention** This is a public forum