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.

Is the msp430 little endian?

Other Parts Discussed in Thread: MSP430F5438A

Hello,

1. Is the msp430 little endian?

I look at the literature and I didn’t find anything.

2. Where can I found Reference?

3. What about the DMA, if the DMA pass data from word to bytes (sending via RS232), what will be the form of data transfer , little or big endian or something else…??

thanks

  • Hi Asher,

    1) Yes.

    2) You don't say which series you're interested in, but section 1.4.5 (Memory Organization) of the MSP430x2xx Family User's Guide covers this for the 2 series/value line. The phrase "little endian" is never used, but the description and diagram of word layout in memory show that this is the case.

    3) I've not used the DMA peripheral, but it appears to depend on the settings of the DMADSTINCRx, DMASRCINCRx, DMADSTBYTE and DMASRCBYTE flags in DMAxCTL. If you try to transfer a word source to a byte dest I'd expect the DMA to transfer only the lower byte of the word. I've not noticed that specified anywhere in the user guide, however.

    Hope that helps, Rob

  • Thanks,

    I'm working with msp430f5438A ,

    but  I assume that all the MSP series works the same way

  • asher bara said:
    What about the DMA, if the DMA pass data from word to bytes (sending via RS232), what will be the form of data transfer , little or big endian or something else…??

    DMA does not split (or combine) words to two bytes or two bytes to a word. The byte/word setting only determines the bus access type done and the address increment amount (1 or 2).
    If you read a word and write to a byte, then only the low-byte is written and the high-byte is discarded. This might be useful when you have a peripheral that has registers that are word-access only (like the DMA controller registers) or are variable size (like the 16 bit ADC12 memory registers which can hold an 8 bit converison result, so the MSB is don't care)
    It can even be used to mass-convert a byte array into a word array. However, it won't help you sending 12 (16) bit ADC results to 8 bit serial UART output register. At least not without some clever tricks and precise timing (ADC conversion speed and serial baudrate precisely matched so you can do byte-to-byte transfers).

  • OOPS, I didn't notice that the message I got a notification for, was moved into its own thread.

    But I take this as an opportunity to add to my last answer :)

    " If you try to transfer a word source to a byte dest I'd expect the DMA to transfer only the lower byte of the word. I've not noticed that specified anywhere in the user guide, however."

    Chapter 11.2.1 (DMA addressing modes) in the 5x family users guide states:
    "When transferring word to byte, only the lower byte of the source-word transfers. When transferring byte to word, the upper byte of the destination-word is cleared when the transfer occurs."

    Maybe this has been added since this thread was started.

**Attention** This is a public forum