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: Error Response for accessing Priviliged Registers in user mode

Part Number: TMS570LC4357

Hi experts,

The Safety Manual states that the Protection mechanism of registers needs to be tested.

To test this we try to write in user mode to registers that are only writable in privileged mode.
The Problem is, that the documentation seems to be very vague with the error response to such an access.
The only list I could find is Table 6-25 in the Data Manual, but that lists only the response FOR ACCESS TO UNIMPLEMENTED LOCATIONS IN FRAME.

Assuming that it is the same for an acces violation in usermode, I get the following:

    - PMM2 - ignored
    - SYS2 - ignored
    - ePWM1 -Data Abort (0xFC522000)
    - P3T5A - Data Abort (Segment 3 base address (0xFFF7BC08U))
    - OTP: Data Abort
    - IOMM -ignored
    - DMA9A - Error Bit and possibly Interrupt

(Q1) Is this correct?

Thank you and best regards,
Max

  • Hi Max,

    Programming the WP (write in privilege mode only) bit field will generate data abort. I confirmed by the following tests:

    // Switch to user Mode ( Shares User Mode registers ) (M = 11111)
    asm(" cps #16"); //user mode
    asm(" mov lr, r0");
    asm(" mrs r1, cpsr");
    asm(" msr spsr_cxsf, r1");

    //- PMM2 - data abort
    pmmREG->GLOBALCTRL1 = 0x101;

    //- SYS2 - data abort
    systemREG2->PLLCTL3 |= (uint32)(0x8800U);

    //- ePWM1 -Data Abort
    *(unsigned int*)(0xFCF78C80) = 0x88997766;

    //- IOMM -data abort
    pinMuxReg->ERR_ENABLE_REG = 0x3;

    //- DMA9A - data abort
    dmaREG->HWCHENAS = 0x7;