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.

DMA source element size on SCI Tx

The Technical Reference Manual SPNU515B states that source and destination element sizes may be different. It warns, in form of a note on page 574, "use data packing feature with caution for reading data from peripherals".

What about sending? Can I read 64 bit into the DMA FIFO and deliver them as bytes to the SCI, one per SCI HW request? Or do requests "work" only on the source side?

  • Rainald,

    The DMA packing and un-packing works for both source and destination.

    In your case (SCI) if the source is defined as 64bits and the destination (SCI TX buffer) is defined as 8bits (has to be) than the DMA will do 1 read 64bits and 4 x 8bits writes to the SCI. one per SCI HW request. This in the unpacking mode.

    In the other direction (receive) the same can be done. Source will be defined has 8bits and destination has 64 bits. The DMA will read 4 8bits data from SCI and will do 1 write to the destination (RAM) This is the packing mode.

    Please let me know if I've clarified your question.

  • Thank you Jean-Marc,

    I understood that the bytes are sequentially written to the same destination address. I need to know the number of bytes written per HW request to avoid losing 7 of 8 bytes. And in case it would work (only one byte is written per HW request), I am not sure how to select the unpacking mode. Is there a configuration value to select whether HW requests work on the source or destination side? Or is that implicit given the source and destination element size?

    Finally, am I right that the element count must be set to 1 for serving peripherals with bytes because requests may work on frames, not elements? Refer to Fig. 16-2.
  •  Rainald,

    I went back to the TRM and found this note:

    The DMA will use the HW request from SCI to read the source (64 bit in your case) and will perform the 8 writes to SCI TX without waiting. So this is definitively not what you want. You will have to do the read from source as 8 bits and write to destination as 8bits.

    In other word, you can't use data unpacking if the destination is a fixed address.

  • Thank you. It is point 2) in the 2nd note to 16.2.6 that I have overlooked.
    I doubt, however, your last sentence. May be a "not" is missing.