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.

RE: MSP430FR5969 DMA transfer size

Other Parts Discussed in Thread: MSP430FR5969, MSP430FR6889

Hi   ,

I Had another problem  regarding DMA transfer.
My DMA settings are as below.

DMACTL0 = DMA0TSEL__UCA0TXIFG;
DMA0SA  = &buff;
DMA0DA  = &UCA0TXBUF; 
DMA0SZ  = 600;                      // Block size in bytes
DMA0CTL = DMADT_4 | DMASBDB| DMASRCINCR_3 | DMAIE| DMALEVEL_L; // Rpt, inc
DMA0CTL|= DMAEN;

and my ISR for DMA is as below,

 __interrupt void DMA_VECTOR_ISR(void)
 {
     DMA0CTL &= ~DMAIFG;
     DMA_Doneflag = 1;
 }

The problem is that., As per this settings I do transfer the data, But When i check on linux based Soc, I am not able to get same size (i.e 600 bytes) everytime, only sometimes  get perfect size, else less size I am getting while this running in long run( i.e I have tested this on 15 min long run) . I am doing this transfer on timer interrupt of 100 ms.

Any suggestions ?


Thanks,

  • Hi Hinesh,

    I split the thread since this is a separate issue from before - please try posting new threads when you have questions on new topics. It will improve people's search experience in the long run for finding relevant threads.

    Can you provide a little bit more information about what you are doing with the DMA? It looks like you are using it to transmit data from a buffer in the MSP, out using the USCI_A module for some form of communication (UART/I2C/SPI?)? When you say you are not seeing 600 bytes every time, can you elaborate on what you mean by this or how you are observing it? Are you saying that you do not always see 600 bytes come out on your UART/I2C/SPI line?

    I was also a little unclear what you mean by you do the transfer on a timer interrupt - I think it would help to know more about the surrounding code (timer, USCI) and how this is being used.

    Please also note, that you will want to check your code for any of the DMA errata mentioned in the errata document (I'm assuming you are still using MSP430FR5969?) www.ti.com/lit/pdf/slaz473 DMA7 could cause you to lose interrupts, and DMA11 could cause the part to reset. You'll want to make sure you have implemented the workarounds for both for best practice.

    Regards,
    Katie

  • Duplicated on Stack Overflow.

    An UART has no error checking or synchronization.

    Possibly the UART's clock source is not accurate enough, or the signal gets corrupted, or the receiving device is not fast enough.

  • Thanks for the link Clemens!

    Hinesh,

     Per Clemens link where you had a little more info on that other forum, I wonder if it would be useful in your case to check the transmission with a scope or logic analyzer, so that you could see what is actually sent on the lines, not just looking at what you've received in Linux? That might help you narrow down if not all bytes are sent from the MSP, or if the issue could be with how the bytes are received on the Linux device.

    In addition, please still check for and workaround DMA7 and DMA11 as mentioned above as those could also potentially cause issues.

    Regards,

    Katie

  • Hi CL..,

    Thanks for comment, There on the other forum I was not able to understand your comment, As there is a link you have mentioned that goes with buffer overrun, But Its not that issue.

    As your comment here, Clock is measured on scope and accurate enough. may signal gets corrupted that I need to check.
    And receiving device is working on 1 Ghz speed and it's capable to handle transfer ( checked on software side also).
  • Hi ,

    first of all Thank you very much for the comment.

    Thanks for pointing me to the correct thread.

    I am Using MSP430FR6889.

    --With DMA I wanted to have a buffer ( of 2KB) that I wanted to send to My SoC over UART(USCI_A ). By using DMA my intention is to Share some CPU load.
    -- I have SoC connected to other end of MSP430 and I am just reading the data coming on SoC UART. From there I came to konw, The size That is transfered was not accurate.
    --Timer Interrupt Means I am using TA1 Module to generate timer of 1ms and That is used for 100ms Timer Interrupt, So when My counter reaches to 100 I initiate the dma transfer.

    As I have observed With scope and data gathered , I was clearing dma interrupt before the transfer gets finished. So Instead I took UART Tx interrupt to check weather transfer is done or not. and issue got resolved.

    Thanks @katie and @Clemens Ladisch. For Replay.

**Attention** This is a public forum