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.

RM57L843: problem while transferring data to SCI through DMA module.

Part Number: RM57L843

Hi !,

My motto is to transfer data to SCI module through DMA. But while doing the same, irrespective of data length, only first and last bytes of my data are getting transmitted (checked this through docklight). 

DMA control packet is configured as below: channel 7 is used (random selection)

{

source address: address of an array which is declared as a global array variable.

destination address: address of SCI3->TD. 

channel control : zero

frame count: 10 (size of declared array is 10)

element count: 1

element and frame destination offsets: 0 (for both source and destination)

port assign: PORTA READ, PORTB WRITE

read size and write size: 8 bites (as source array is declared as uint8)

transfer type: BLOCK TRANSFER

source address mode: address increment

destination address mode: fixed address

auto initialization OFF.

set control packet in DMA RAM  (channel 7)

enable channel 7

waiting until the SCI TD is ready to receive next character.

ema dma

waiting until BTC flag for channel 7 set

}

after BTC flag getting SET, only first and last bytes are getting transmitted.

NOTE: the transmission is going well, when source data is given directly to SCI->TD without DMA

  • Hi Satyanarayana,

    Actually, the transfer type should be Frame transfer not the block transfer.

    If we use transfer type as frame then the data transfer will happen after each byte shifting from SCI Tx register, i mean Tx empty flag will get set after each byte transfer and this will trigger the DMA and then DMA will move the one byte from source to the Tx register.

    If we use block transfer then after first byte shift the entire data (that is all frames or all bytes) will be overwritten to the Tx register without even moving each byte, so because of this only we can get first and last bytes if we use block transfer for this use case.

    --

    Thanks & regards,
    Jagadish.