infineon4engineers Facebook

infineon@google+ Google+

infineon@linkedin linkedin

infineon4engi@twitter twitter

infineon@youtube youtube

+ Reply to Thread
Results 1 to 5 of 5

Thread: TC234 - DMA SRI bus error

  1. #1
    Beginner Beginner derzsi is on a distinguished road
    Join Date
    Aug 2018
    Posts
    3
    Points
    55

    TC234 - DMA SRI bus error

    Hi everyone!

    After days of trying to work with the DMA module on the TC234 Tricore MCU I have no idea what I am doing wrong.
    I would like to write a simple test program for the DMA. The test program transfers a 32 bit word from a source to a destination address, it's very simple.
    The code is based on the use case example in the TC234 User Manual. The source code is the following:

    volatile unsigned int error = 0x00000000;

    void InitDma()
    {
    volatile signed long dummy = 0;
    volatile signed long i = 0;

    ResetENDINIT();
    DMA_CLC.U = 0x0;
    dummy = DMA_CLC.U;
    SetENDINIT();

    for(i = 0; i < 100000; i++)
    {
    asm("nop");
    asm("nop");
    }

    ResetENDINIT();
    DMA_ACCEN00.U = 0xFFFFFFFF;
    DMA_ACCEN10.U = 0xFFFFFFFF;
    DMA_ACCEN20.U = 0xFFFFFFFF;
    DMA_ACCEN30.U = 0xFFFFFFFF;

    DMA_MODE0.U = 0x00000001;
    DMA_MODE1.U = 0x00000001;
    DMA_MODE2.U = 0x00000001;
    DMA_MODE3.U = 0x00000001;
    SetENDINIT();
    }


    void TransferUInt(unsigned int src, unsigned int dst)
    {
    ResetENDINIT();
    DMA_SADR000.U = src; //source address
    DMA_DADR000.U = dst; //destination address
    DMA_CHCFGR000.U |= (010 << 21);
    DMA_TSR000.U |= (1 << 17);
    DMA_CHCSR000.U |= (1 << 31);
    error = DMA_ERRSR1.U;
    SetENDINIT();
    }

    The Initdma() functions gets called in the main function after companion chip and PLL settings initialization.
    TheTransferUInt() function gets called after the DMA module initialization.
    After that, in the error variable I can see, that this request caused a source error (DMA_ERRSR1.SER == 1) and an SRI bus error (DMA_ERRSR1.SRIER == 1) in the DMA move engine 1.
    The source and destination addresses are 64bit aligned " __attribute__ ((aligned(64))) " and written correctly into the SADR and DADR registers.

    I suggest that we are speaking about an invalid access on the SRI bus. But if I know right, all access bits are enabled by default and in any of the examples there are no access register modification before the DMA initialization.
    I am really confused and searched all the user manual for any relevant information.

    Please help me to resolve this problem!

    Thank you!

  2. #2
    Beginner Beginner
    Infineon Employee
    Infineon Employee
    MoD is on a distinguished road
    Join Date
    Feb 2012
    Location
    Munich
    Posts
    15
    Points
    318.75
    Which values (addresses) you wrote to SADR and DADR?
    The views expressed here are my personal opinions, have not been reviewed or authorized by Infineon and do not necessarily represent the views of Infineon.

  3. #3
    Beginner Beginner derzsi is on a distinguished road
    Join Date
    Aug 2018
    Posts
    3
    Points
    55
    They are two global variable declared the following way:

    __attribute__ ((aligned(64))) unsigned int srce = 150;
    __attribute__ ((aligned(64))) unsigned int desti = 0;

    The function was called this way:

    TransferUInt((unsigned int)(&srce), (unsigned int)(&desti));

    The values written in the registers:

    Address of srce: 0xD0000000;
    Address of desti: 0xD0000500;

    These are the correct addresses written in the SADR and DADR. I can check them in the .map file.

    Any ideas?

  4. #4
    Advanced Advanced cwunder is on a distinguished road
    Join Date
    Feb 2015
    Location
    USA
    Posts
    48
    Points
    757.5
    The problem is the address you have chosen.

    Address of srce: 0xD0000000;
    Address of desti: 0xD0000500;
    See the section 6.7.2: ´CPU, ´Local and Global Addressing´ for CPU local views to segment ´C´ and segment ´D´ in the user's manual. Basically you need to address the DSPR by its global address which for the TC234 is 0x70000000--0x7002DFFF.

  5. #5
    Beginner Beginner derzsi is on a distinguished road
    Join Date
    Aug 2018
    Posts
    3
    Points
    55
    Thank you!

    Changing the base address solved the problem.

+ Reply to Thread

Tags for this 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.