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.

TMS570LS3134: DMA Parity continuous ESM Error

Part Number: TMS570LS3134
Other Parts Discussed in Thread: HALCOGEN

Tool/software:

Hello,

In my application DMA and DMA parity check is using.

I do the MINITGCR = 0xA to enable memory hardware initialization and MSINENA  = 1 to initialize DMA RAM.

When I start the code with DMA parity enable by setting DMAPCR and DMA receiving data, there is continuous ESM group 1 Channel 3 DMA parity error.

Could you please help me about it ?

Thank you.

  • Hi Samet varan,

    Is it possible to share your code snippet for quick verification from my end once?

    --
    Thanks & Regards,
    Jagadish.

  • Hi Jagadish,

    Thank you for your reply. I shared the code snippet below

     

    void _c_int00(void)
    {
    _coreInitRegisters_();
    _coreInitStackPointer_();

    .
    .
    .

    /*
    * Inside the systemInit function there is
    * setupPLL, periphInit, setupFlash functions etc.
    */
    systemInit();
    memoryInit(0x1U); // Between the systemInit and memoryInit functions, there is not any other function

    .
    .
    .

    }

    void memoryInit(uint32 ram)
    {
    systemREG1->MINITGCR = 0xAU;
    systemREG1->MSINENA = ram;
    while((systemREG1->MSTCGSTAT & 0x00000100U) != 0x00000100U)
    {
    }/* Wait */

    systemREG1->MINITGCR = 0x5U;
    }

    void main(void)
    {
    muxInit();
    hetInit();
    sciInit();
    rtiInit();
    gioInit();
    spiInit();
    DmaInit();

    dmaREG->DMAPCR = 0x0000000A; // DMA Parity Enable - It is added here for the test

    while(1)
    {
    .
    .
    .
    }
    }

    void DmaInit()
    {
    SCI->SETINT |= SCI_SET_RX_DMA |SCI_SET_RX_DMA_ALL;
    g_dmaCTRL g_dmaCTRLPKT1;

    DmaReqAssign(DMA_CH0,DMA_SCI1_RX);

    /*Configure control packet for Channel 0*/

    g_dmaCTRLPKT1.SADD = (uint32)((u8*)&(SCI->RD)+3); /* source address*/
    g_dmaCTRLPKT1.DADD = (uint32)&dma_rx_buffer[4]; /* destination address */
    g_dmaCTRLPKT1.CHCTRL = 0; /* channel control */
    g_dmaCTRLPKT1.FRCNT = DMA_BUFFER_SIZE; /* frame count */
    g_dmaCTRLPKT1.ELCNT = 1; /* element count */
    g_dmaCTRLPKT1.ELDOFFSET = 0; /* element destination offset */
    g_dmaCTRLPKT1.ELSOFFSET = 0; /* element destination offset */
    g_dmaCTRLPKT1.FRDOFFSET = 0; /* frame destination offset */
    g_dmaCTRLPKT1.FRSOFFSET = 0; /* frame destination offset */
    g_dmaCTRLPKT1.PORTASGN = 4;
    g_dmaCTRLPKT1.RDSIZE = ACCESS_8_BIT; /* read size */
    g_dmaCTRLPKT1.WRSIZE = ACCESS_8_BIT; /* write size */
    g_dmaCTRLPKT1.TTYPE = FRAME_TRANSFER; /* transfer type */
    g_dmaCTRLPKT1.ADDMODERD = ADDR_FIXED; /* address mode read */
    g_dmaCTRLPKT1.ADDMODEWR = ADDR_INC1; /* address mode write */
    g_dmaCTRLPKT1.AUTOINIT = AUTOINIT_ON; /* autoinit */

    DmaSetCtrlPacket(DMA_CH0, g_dmaCTRLPKT1);
    DmaSetChEnable(DMA_CH0, DMA_HW);
    DmaEnable();
    }

  • Hi Samet varan,

    You no need to do the hardware memory initializations to enable DMA parity,

    Actually, memory hardware initializations will happen immediately after reset like as shown above picture. Actually, we shouldn't do this memory hardware initializations in run time because this is kind of destructive thing, it will erase entire context of the core.

    So, my suggestion would be you can directly enable the DMA parity, without doing any hardware memory initializations in run time.

    --
    Thanks & regards,
    Jagadish.

  • Hi Jagadish,

    I dont initialize the RAM in run time. Init sequences are in "void _c_int00(void)" function which is in "startup" so this is not called in runtime. 

    For the memory initialization, yes it happen immediately after reset but we should enable DMA parity before initialization. 

    In the belove figures, shows that parity should be enabled before initialization and Halcogen generate the code compatible with reference manual.

  • Hi Samet,

    Can you try the method mentioned in the below thread:

    (+) RM44L920: DMA-Parity error after DMA-Controlpacket initialization - Arm-based microcontrollers forum - Arm-based microcontrollers - TI E2E support forums

    Enabling the DMA parity register before using the auto-initialization approach for the DMA RAM during the startup solved the issue. ESM stopped reporting a parity error unless I apply a corresponding test to test the diagnosis

    --
    Thanks & regards,
    Jagadish.