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.

Intermittent Data Abort Exception

Other Parts Discussed in Thread: HALCOGEN

Intermittent Data Abort Exception

Hi,

CCS 5.1.0.201201061800
CGT 4.7.1
TMS570LS31x Hercules Microcontroller Development Kit (HDK)
Spectrum Digital XDS510 USB Plus

I have an intermittent data abort exception occuring on the above platform, as follows:

1. Reliably after power on reset (S4 PORRST) no data abort exception (no JTAG connected).
2. Every say 1 in 20 warm reset (S3 RST) a data abort exception (no JTAG connected).
3. With JTAG connected, a data abort exception on every 'CPU Reset/Resume'.

My data abort exception handler simply calls standard startup code _c_int00(). Without JTAG connected, the application enters an infinite loop of data abort exception leading to startup through _c_int00() every say 1 in 20 warm reset (S3 RST). Subsequent warm reset (S3 RST) then ALWAYS fails with data abort. The system requires a power on reset (S4 PORRST) to get going again.

Using JTAG I have demonstrated that it is the data abort exception that is occuring (assuming of course that the fault is the same one with/without JTAG connected). The data abort exception occurs on innocuous peripheral register read/writes, always the same one within a particular application build (the causal register varying if I vary the application image by function delete etc). For example last instruction in the following code snippets:

2211 (regSciLin[SCI_LIN_MODULE_2_E]).SCIPIO0 = 0x00000000U;
0000c4e8: E58C413C STR R4, [R12, #316]

1889 if(0U == (regDmm.DMMGLBCTRL & 0x01000000U))
0000c470: E59FC1F4 LDR R12, $C$CON21
0000c474: E59C0000 LDR R0, [R12]

At breakpoint at the data abort exception vector (address 0x10), inspection of the ESM registers indicate that no error has been detected, and nERROR line is not asserted.

I have used HALCoGen as the basis for my startup code, particularly in PLL setup where we start at 5MHz before lock and then immediately switch to 160MHz.

I wonder if there is some borderline condition, maybe in parity or ECC setup that might be causing the problem, but I would expect ESM to pick this up. It is noteworthy that a PORRST does not cause a data abort exception but a RST does.

A final confusing point: I am sure that I have had the very same application running under JTAG control without data abort exception on every reset/resume. Could I have possibly damaged the hardware kit in some way that would lead to the symptoms I am seeing. I should note however that I have two HDK and witness the same behaviour on each, maybe I have damaged them both in the same way? Seems unlikely.

All suggestions are welcome, regards, Tony.

  • Regarding my 'final confusing point' above, it seems as though the success or not of running under JTAG depends on the state of the system when I connect. If the system is in its data exception abort state, then it will carry on in this fashion under JTAG, if the system was running before data exception abort induced, then it will run under JTAG okay. In this case, the data abort exception can be induced by performing several CPU Reset/Resume operations, so similar to running without JTAG.

    I suppose this behaviour is explained by there being no PORRST when I connect JTAG, so the system remains in its previous state, either with or without data abort exceptions.

    Regards, Tony.

  • Tony,

    In the following code,

    1889 if(0U == (regDmm.DMMGLBCTRL & 0x01000000U))
    0000c470: E59FC1F4 LDR R12, $C$CON21
    0000c474: E59C0000 LDR R0, [R12]

    What is the value of R12? Is it the expected value (DMM register)?
    Your device initialization is done by HalcoGen? what is the setup for the Flash (Wait state)?


  • Hi Jean-Marc,

    In all register read/write failures, the address of the register is always correct.

    Our flash setup is as follows:

    /* Setup flash read mode, address wait states and data wait states */
    regFlashControl.FRDCNTL = 0x00000311UL; /* Flash option control register
    ---- ---- ---- ---- ---- 0011 ---1 ---1
                             0011           RWAIT = 3 (add 3 wait states to flash read)
                                     1      ASW-STEN = 1 (Address setup wait state enabled)
                                          1 ENPIPE = 1 (Pipeline mode is enabled) */

    /* Setup flash wait states for bank 7 (EEPROM emulation) */
    regFlashControl.FSM_WR_ENA = 0x00000005UL; /* Flash state machine write enable
    ---- ---- ---- ---- ---- ---- ---- -101
                                        101 WR_ENA = 5 Enable writes to flash configuration registers */

    regFlashControl.EEPROM_CONFIG = 0x00030002UL; /* EEPROM Emulation configuration Register
    ---- ---- ---- 0011 ---- ---0 0000 0010
                   0011                     EWAIT = 3 3 wait states
                                0           AUTOSUSP_EN = 0 Auto-suspend = disabled
                                  0000 0010 AUTOSTART_GRACE = 2 Wait 2 * 16 HCLK periods after the last access before resuming */

    regFlashControl.FSM_WR_ENA = 0x00000002UL; /* Flash state machine write enable
    ---- ---- ---- ---- ---- ---- ---- -010
                                        010 WR_ENA = 2 Disable writes to flash configuration registers */


    /* Setup flash bank power modes */
    regFlashControl.FBFALLBACK = 0x0000C00FUL; /* Flash bank fallback power register
    ---- ---- ---- ---- 11-- ---- ---- 1111
                        11                  BANKPWR7[1:0] = 3 (Set bank 7 active)
                                       11   BANKPWR1[1:0] = 3 (Set bank 1 active)
                                         11 BANKPWR0[1:0] = 3 (Set bank 0 active) */

    Regards, Tony.

  • Tony,

    Can you check the PMM (Power Management Module)
    On this device, resources are split in different power domain that can be shut down when not used to save power.

    All debug modules (RTP DMM, ETM...) are in the PD2.
    This domain should be on after power on reset.

    Because of a problem on this silicon revision (Rev A) we recommend not to use nRST.
    Using nRST may create an wrong initialization of PMM and some domain may be stuck inactive.

    Using PORRST will always work.

    If in your application there is a need to generate a reset, we recommend resetting the only using the System Module.
    2.5.1.48 System Exception Control Register (SYSECR) in TMS570LS31x User's guide.

    This problem is fixed in the revision B of the silicon and we are building new boards with this new revision.

  • Thanks Jean-Marc, this sounds hopeful doesn't it. I will verify tomorrow. Thanks for your swift advice, regards, Tony

  • Hi Jean-Marc,

    I've implemented reset using 'regSystem1.SYSECR = 0x00008000UL' as you suggest.

    I do still get the lock-up when running without JTAG (above reset won't be PORRST).

    When running under JTAG I witness the data abort following 'CUP Reset/Resume'. I've looked at the PMM registers and it does show PD2 memory in transition status:

    • LOGICPDPWRCTRL0 = 0x05050505
    • MEMPDPWRCTRL0 = 0x05050500
    • LOGICPDPWRSTAT0 = 0x00010003

    Regards, Tony.

  • Tony,

    In your last post, I don't understand what is the sequence that creates the lock-up condition (without JTAG)

    nPORRST can be used without problem. It's nRST that may cause this Power Management issue. When the problem is visible, only a nPORRST can fix it.

    Again this is a problem that is fixed in silicon Rev_B.

  • Hi Jean-Marc,

    Lock up is created by applying a warm reset (S3 RST) on the HDK. This only occurs intermittently (say 1 in 20). I am assuming the problem I witness with JTAG connected is the same as without JTAG connected.

    Regards, Tony.

  • Hi Tony,

    The LS3137 rev A silicon has a couple of severe issues related to the warm reset (or system reset).

    One of them is with the switchable power domains getting "stuck in transition" so that any access to a module in these domains would result in a data abort.

    The other issue is related to the state of nTRST (test logic reset). When this input is High (as is the case when you have a JTAG emulator connected), there is a possibility of the CPU getting stuck in a halted state whenever system reset is asserted. This shows up as a lock-up, in that the CPU is not executing any code.

    Both these issues are corrected in the silicon revision B.

    Regards, Sunil

  • Hi Sunil,

    I think it's pretty certain that my issues are related to rev A silicon.

    My use of the term 'lock-up' does not mean that the processor is halted, rather that it is stuck in the reset/data abort exception loop.

    I don't suppose you know when rev B silicon LS3137 HDK boards will be available, I would obviously like to swap my two rev A for rev B boards.

    Regards, Tony.

  • Hi Tony,

    All LS3137 HDKs currently shipping include the rev B silicon.

    Regards, Sunil