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: IOM3: ESM Error on write Error always enabled?

Part Number: TMS570LC4357


Hi Experts,

The Safety Manual list diagnostic IOM3 as always enabled. This would mean, that a write in usermode oder to unimplemented location would result in an ESM 137.

The sligthly confusing part is the existence of the ERR_ENABLE_REG (Error Signaling Enable Register). Judging from the discription, this does not refer to the Error itself, but to an interrupt that gets called when the error occurs. The Problem is, if I wanted to use an interrupt I could use the ESM interrupt that gets called when ESM1.37 is signaled (if enabled).

 (Q1) What is the purpose of this register and do I need to turn the error signal to the esm?

Thank you and best regards,
Max

  • Hi Max,

    You are right that writing data to PINMMR registers in user mode will generate ESM 1.37 error. But to generate ESM 1.37, 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,

    The Sfety Manual describes iom3 as follows:

    Error Trapping - IOMM
    The IOMM can trap address and privilege errors on received transactions. Transactions that attempt to
    access un-implemented locations in the IOMM chip select result in an ESM response. Transactions that
    are not in privileged mode also generate an ESM response.
    This feature is enabled after reset. Software cannot disable this feature.

    Since the SW must enable this feature, there is a error in the Safety Manual. Correct?

  • Hi Max,

    There is no problem in the statement. The  IOMM traps the errors and sets the error flags in IOMM status and error registers. The trap mechanism is enabled after reset. 

  • Hi QJ.

    Okay that statement is referring to the error trapping itself and not to this: "

    Transactions that are not in privileged mode also generate an ESM response."