TMS570LC4357-EP: Intermittent issue with N2HET

Part Number: TMS570LC4357-EP
Other Parts Discussed in Thread: TMS570LC4357



Hello,

We are currently developing software on a TMS570LC4357-EP and are running into an intermittent problem with the N2HET module that we have difficulty root causing. We were hoping for some assistance in understanding what could affect this peripheral, to help figure out which part of our system (either software or hardware) could be causing this and whether or not you’ve seen similar issues in the past.

The context of the problem is this:
We use the N2HET peripherals as GPIO i.e. we disable the HTU and the HET controller. We also use a development probe (Lauterbach Trace32 probe) to debug our boards. When we issue resets from the probe to the HW board, the probe sends a command to the nRST pin to reset the MCU. The MCU remains powered on during this reset.

The N2HET works as expected most of the time but intermittently fails, about 1 in 10000 times, after we issue the reset command. During the startup sequence of our bootstrap, the N2HET would be unresponsive, after putting peripherals out of reset. It's as if the peripheral remains in a reset condition despite us using commands to get it out of reset. This issue remains until the next full electrical power cycle of the TMS570LC4357-EP.

When the issue happens, both N2HET1 and N2HET2 have all their all registers (control, direction, input, outputs, etc.) zeroed out and no longer editable. Reads to the HET input pins fail as they always return 0x00000000.

Resetting power domain pins (PDPWRDWNSET and PDPWRDWNCLR) makes no differences. Same with the VLCK CDDIS pins. We cannot seem to get the HET out of reset from that point onwards until we power cycle.

Our start up sequence up until the point of failure is as follows:

  1. we erase core registers (R0 to R12)
  2. we set FIQ, IRQ, Abort, Undefined and System modes,
    1. FIQ = 10001
    2. IRQ = 10010
    3. Abort = 10111
    4. Undef = 11011
    5. System = 11111
  3. We enable VFP Unit
  4. We clear Floating point registers (D0-D15)
  5. We set the stack pointers
  6. We initialize the RAM memory
    1. load and configure RAMCTRL,
    2. enable global memory hardware initialization via MINITGCR
    3. enable auto hardware initalization via MSIENA and wait for it to complete
    4. disable global memory hardware initialization via MINITGCR
  7.  we bring peripherals out of reset, by doing this:
    1. forcing the primary system register (0xFFFFFF00) CLKCNTL bit 5 to 0 (to forcefully disable peripherals),
    2. setting all the PSPWRDWNCLRx to 0xFFFFFFFF, for PCR1, PCR2 and PCR3, then
    3. forcing the primary system register CLKCNTL bit 5 back to 1 (to forcefully re-enable peripherals),

After this, the HET should have be brought out of reset and be operational but sometimes it isn’t.

We initially suspected a VCLK issue (errata GCM#58 when VCLK <= HCLK/4) but this would be strange: we assume by default the ratio is VCLK/HCLK = 1/2 at startup, up until peripherals are out of reset. Also, our custom PLL configurations happen later in the startup it sets HCLK = 150MHz and keep VCLK1 and VCLK2 at a div ratio of 1/2.

Any help or other theories on what could be affecting the system would be appreciated. Attached are the register snapshots at start of operation, prior to and after reset and shortly after N2HET issue is encountered.

2112.Collected register values.zip

  • Hi Donald,

    Apologies for the delayed response, 

    We never came across this issue before on these devices, our internal AI suggesting few theoretical root cause, could you please verify them once:

    Most Likely Root Cause Theories

    Red circle Theory 1: Race Condition Between nRST Deassertion and the PCR/CLKCNTL Peripheral Enable Sequence (Most Probable)

    Your startup sequence performs a forced peripheral disable → PSPWRDWNCLRx → forced peripheral re-enable cycle (steps 7a–7c). This is a non-standard sequence. The TMS570 Technical Reference Manual (TRM) describes a specific ordering for peripheral frame power-up. The concern here is:

    • When the Lauterbach probe drives nRST, the reset release timing is controlled externally by the probe, not by the device's internal power-on-reset (POR) sequencer.
    • If nRST is released at a point where the internal oscillator or GCLK/HCLK is in a transient state, the PCR (Peripheral Central Resource) state machine may not complete its internal reset handshake correctly before your code writes to PSPWRDWNCLRx.
    • Writing 0xFFFFFFFF to all PSPWRDWNCLRx registers while the PCR is still in an intermediate reset state could cause the PCR to latch into an inconsistent state where it believes the peripheral frames are powered but the internal reset to those frames was never properly deasserted.

    This would explain why the registers appear zeroed and unwritable — the HET frame's internal reset is still asserted at the register bus level, even though the PCR power-down bit is cleared.

    Red circle Theory 2: nRST Glitch / Insufficient nRST Pulse Width from the Lauterbach Probe

    The TMS570LC4357 requires a minimum nRST pulse width (typically specified in the device datasheet, often ≥ 1 µs, but the internal reset sequencer may require longer). If the Lauterbach Trace32 probe issues a very short nRST pulse:

    • The device's internal reset controller (ESM, SYS, PCR) may not fully complete its reset sequence.
    • The PCR reset state machine may be left in an intermediate state.
    • This is consistent with the 1-in-10,000 failure rate — it could be a marginal timing condition that only manifests under specific temperature/voltage/clock phase conditions.

    Recommended check: Use an oscilloscope to measure the nRST pulse width generated by the Lauterbach probe and compare it against the TMS570LC4357 datasheet minimum specification.

    yellow circle Theory 3: Interaction with the TMS570 Reset Controller and Warm Reset vs. Cold Reset Behavior

    The TMS570 distinguishes between different reset types (POR, warm reset via nRST, software reset, debug reset). A warm reset via nRST does not reset all registers to their POR state — specifically:

    • The PCR power-down registers (PSPWRDWNCLRx/PSPWRDWNSETx) may retain their state across a warm nRST reset in some silicon revisions.
    • If a previous run left any peripheral frame in a powered-down state, and the nRST reset does not clear this, your PSPWRDWNCLRx write may be racing against the reset sequencer re-asserting the power-down state.

    Check: Read back the PSPWRDWNSETx registers immediately after your step 7b to verify they are actually cleared before proceeding to step 7c.

    yellow circle Theory 4: Errata GCM#58 — VCLK/HCLK Ratio (Your Hypothesis)

    You correctly noted errata GCM#58. While you assume VCLK/HCLK = 1/2 at startup, it is worth verifying:

    • At the point of your step 7 (peripheral bring-out-of-reset), what is the actual CLKCNTL register value? Specifically, confirm VCLKR and VCLK2R fields.
    • If the probe reset leaves the clock divider registers in an unexpected state (not POR default), it is possible VCLK could momentarily be at a ratio that triggers GCM#58 during the PCR access.

    orange circle Theory 5: Lauterbach Probe JTAG/DAP Interaction During Reset

    The Lauterbach Trace32 probe maintains a JTAG/DAP connection during the reset. There is a known class of issues on ARM Cortex-R devices where:

    • The debug access port (DAP) can hold certain system bus transactions open during reset.
    • If the probe is actively polling registers (e.g., for a live watch window) at the moment nRST is asserted/deasserted, a partially-completed AHB/AXI transaction to the PCR or SYS register space could corrupt the PCR state machine.

    --
    Thanks & regareds,
    Jagadish.

  • Hi Jagadish,

     So we’ve tested a few of these theories out + some of our own. I’ll give you the quick summary of the results:

    Theory 1: Race Condition Between nRST Deassertion and the PCR/CLKCNTL Peripheral Enable Sequence (Most Probable)
     We didn’t find an initialization sequence for TMS570LC4357 but we assume this one for the TMS570LS043 is applicable, in section 2 (Initialization of the TMS570LS043x, 570LS5033x & RM42L432 Hercules ARM Cortex-R4). If the correct initialization sequence for TMS570LC4357 is different, please let us know.

     We tested changing the order of operations (PLL enabled either before or after peripherals are brought out of reset) but the results were the same. We are pending a test where we do all these changes but only release the clock after enabling peripherals and will keep you informed if this has any different result.

    Theory 2: nRST Glitch / Insufficient nRST Pulse Width from the Lauterbach Probe
     This was ruled out via electrical testing: we monitored the nRST pin with an oscilloscope and the Lauterbach probe’s pulse width was 400ms, well above the 2000 ns threshold shown in the datasheet (section 6.4.2)

    Theory 3: Interaction with the TMS570 Reset Controller and Warm Reset vs. Cold Reset Behavior
     PCR power-down registers (PSPWRDWNCLRx/PSPWRDWNSETx) maintained their configuration in between warm resets, but the values were not erroneous. I confirm it looks like from the PCR registers that the power domain was not powered-down prior to the reset or after it.

    Theory 4: Errata GCM#58 — VCLK/HCLK Ratio
     At the point when peripherals are brought out of reset (and during the reset operation), the actual CLKCNTL register values are 01010100, i.e. VCLKR2 set to HCLK/2, VCLKR set to HCLK/2  and PENA in No reset state.

    Theory 5: Lauterbach Probe JTAG/DAP Interaction During Reset
    Probe isn’t polling registers from a live watch during the operation so this seems very unlikely. The processor is stopped and the probe is only sending a reset command when this happens (no data read from the probe, only a write to command the reset + nRST toggle)

    We are starting to suspect it’s something in the interaction between tester rig and the MCU, as it does not appear to affect all our test bench setups (some benches appear to not have been affected by this intermittent issue while others do). There are some differences with the harnessing and the IOs feeding data to the MCU board (the MCU board themselves are identical). Do you have a theory on what kinds of test rig interaction could cause a peripheral lock-up? Like some transient feedback from one of the IO pins in particular or a latch-up condition? We suspected a problem with Vref transients, but are scratching our heads because we thought that would have caused a lock-up of multiple peripherals instead of an isolated one? FYI, GPIO ports (A and B) remain working fine, as well as DMA, zSPI, and similar others.