infineon4engi@twitter infineon@linkedin infineon4engineers infineon@youtube
twitter Facebook Linkedin Youtube

+ Reply to Thread
Results 1 to 3 of 3

Thread: XMC4500 Relax Kit -> Array -> UART transmission using DMA

  1. #1
    Beginner Beginner XmCfAn2014 is on a distinguished road
    Join Date
    Jun 2014
    Posts
    61
    Points
    125.33203125

    XMC4500 Relax Kit -> Array -> UART transmission using DMA

    Hello everyone,

    I have a simple task -> transmit data
    uint16_t srcBuffer[1024] -> UART at 1Mbod speed.

    I took example "DMA003_USIC" from this thread
    MEMORY->UART
    I migrate it to my XMC4500 Relax Kit, create TestArray by srcBuffer[i]=16*i+1 and catch transmitted data by Realterm.

    Data transmitted regularly through UART, but their integrity is NOT OK.
    Approximately first 30 words transmitted fine, but then some amount of data missed, and so on.

    I have impression that something wrong with handshake, so FIFO buffer is overwritten on some reason.

    BR
    K
    Last edited by XmCfAn2014; Feb 4th, 2020 at 04:52 AM.

  2. #2
    Beginner Beginner XmCfAn2014 is on a distinguished road
    Join Date
    Jun 2014
    Posts
    61
    Points
    125.33203125
    Everything works fine with DMA settings:

    Single Transfer width = 8;
    DMA Burst Width = 8
    Block Size = 256;

    UART Transmit FIFO = 16;

    It as well works with Block Size = 320;
    4D 38 30 30 0D DA - is my header.

    Click image for larger version

Name:	Data_OK_320_bytes.png
Views:	3
Size:	150.0 KB
ID:	4436

    But, with Block Size = 340; and above -> It doesn't work!
    Transmission data messed up....

    Click image for larger version

Name:	Data_NOK_340_bytes.png
Views:	1
Size:	137.8 KB
ID:	4437

    I just change Block Size with single string string...
    DMA003_Handle0.DMAChRegs->CTLH = 340;

    Project: DMA003_USIC_XMC4500.zip

    BR
    K
    Last edited by XmCfAn2014; Feb 4th, 2020 at 05:08 AM.

  3. #3
    Beginner Beginner XmCfAn2014 is on a distinguished road
    Join Date
    Jun 2014
    Posts
    61
    Points
    125.33203125
    Even I can not get 6000 bytes array from UART, using simple code:

    for(i=0; i<1000; i++)
    {
    UART001_WriteDataMultiple(&UART001_Handle0, BlockHeader, 6);
    uS_Delay(200);
    }

    Problem was with USB<->UART adapter based on OTi6858 chip. It supports 3Mbod, but only in small chunks, due its buffer size.
    I took SUUC0041 instead, based on CP2102 chip, and get successfully 2048 bytes transmitted on 921600 speed.

    K
    Last edited by XmCfAn2014; Feb 10th, 2020 at 03:56 AM.

+ Reply to Thread
Disclaimer

All content and materials on this site are provided “as is“. Infineon makes no warranties or representations with regard to this content and these materials of any kind, whether express or implied, including without limitation, warranties or representations of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. No license, whether express or implied, is granted by Infineon. Use of the information on this site may require a license from a third party, or a license from Infineon.


Infineon accepts no liability for the content and materials on this site being accurate, complete or up- to-date or for the contents of external links. Infineon distances itself expressly from the contents of the linked pages, over the structure of which Infineon has no control.


Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Usage Terms of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Usage Terms of this site. Infineon reserves the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.