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.

TMS570LC4357: Regarding ESM 1.37 that notify IOMM error

Part Number: TMS570LC4357

Hello, 

This is a question regarding ESM 1.37 that notify IOMM error.(ESM1.37:Group1 Channel37)
We are now testing the ESM function of TMS570 MCU on the evaluation board.
Based on explanation in Sec 6.6.2 of SPNU563A, we tried to force ESM 1.37 by using the following test codes.
But the test result was not as expected. The MCU notified no error.

Address Error)
To read FFFF2000h on supervisor mode.

volatile uint32 *iomm_oob = (uint32 *)0xFFFF2000;
volatile uint32 val32;

/* Enable Pin Muxing */
pinMuxReg->KICKER0 = 0x83E70B13U;
pinMuxReg->KICKER1 = 0x95A4F1E0U;

val32 = *iomm_oob; /* Out of Bounds Read */

/* Disable Pin Muxing */
pinMuxReg->KICKER0 = 0x00000000U;
pinMuxReg->KICKER1 = 0x00000000U;

Protection Error)
To write KICK_REG0/KICK_REG1/PINMMRnn on user mode.
MPU configuration accept R/W access to IOMM reg on user mode.

/* Enter User Mode */
asm(" STMFD sp!, {r0}");
asm(" MRS r0, CPSR");
asm(" BIC r0, r0, #0x1f");
asm(" ORR r0, r0, #0x10");
asm(" MSR CPSR, r0");
asm(" LDMFD sp!, {r0}");

/* Enable Pin Muxing */
pinMuxReg->KICKER0 = 0x83E70B13U;
pinMuxReg->KICKER1 = 0x95A4F1E0U;

pinMuxReg->PINMUX[7] = 0U;

/* Disable Pin Muxing */
pinMuxReg->KICKER0 = 0x00000000U;
pinMuxReg->KICKER1 = 0x00000000U;


Should we modify the test codes? Please advise.

Thanks,

Sho.

  • Hi Sho,

    Accessing the un-implemented memory frame generates a data abort. 

  • Hello QJ-san,

    I understand to generate a data abort when accessing the un-implemented memory frame.

    I think ESM1.37 is noticed at same time when occurring data abort, is it correct?

    Could you please tell me about technique of generating ESM1.37.

    Thanks,

    Sho

  • Hi Sho,

    Sorry for late response. Writing data to PINMMR registers in user mode will generate ESM 1.37 error. But the ERR_ENABLE_REG should be enabled first.

    Example code:

    //entering user mode

    asm(" cps #16");
    asm(" mov lr, r0");
    asm(" mrs r1,cpsr");
    asm(" msr spsr_cxsf, r1");

    /* Enable Pin Muxing */
    kickerReg->KICKER0 = 0x83E70B13U;
    kickerReg->KICKER1 = 0x95A4F1E0U;

    //Enable addr and protection error signaling
    iommErrFaultReg->ERR_ENABLE_REG = 0x3;

    //write data to pinmmr in user mode
    pinMuxReg->PINMMR7 = 0U;

    /* Disable Pin Muxing */
    kickerReg->KICKER0 = 0x0;
    kickerReg->KICKER1 = 0x0;

    The ESM 1.37 will be set: The fault address is 0x12C (offset of pinmmr7 register)

  • Hi QJ-san,

    Thank you for your support.

    best regards,

    Sho