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: Boot Problems

Part Number: TMS570LC4357
Other Parts Discussed in Thread: HALCOGEN, TPS3703

Good Morning TI Sugarland,

I have a client doing some interesting stuff with the LC4357.  They have written their application using Rust instead of C and are using Lauterbach tools for debug/flash programming.  The issue they have is their application never boots during a normal power up sequence.  If however they cycle PORRST after the board is powered, their application starts up just fine.

To eliminate the possibility of board level problems, I wrote a blinky application in CCS that uses the CPU to toggle IOs.  This was programmed using an XDS110 and it has no issues booting so I don't think there are any board issues.

I know this isn't much information, but I don't have much visibility into their software.  Do you have any guidance on things to check?  Given what I know about the device I've been steering them toward investigating the MPU and ECC.  I also provided them with 
http://www.ti.com/lit/an/spna106d/spna106d.pdf

We need to get this booting ASAP so we can ship this to a lead customer.  I really appreciate any guidance you might have.  

Best,

Trey

  • Hello Trey,

    1. The spna106 is for Cortex-R4. Please use example_safetylib.c for LC4357 as example. This file is in HALCOGen example folder:

    C:\ti\Hercules\HALCoGen\v04.07.01\examples\TMS570LC43x

    2. Does the device get data abort or instruction abort? If yes, please find the abort status and abort address:

        CCS --> Registers window --> CP15 register --> Data fault status register, and data fault address register.

    3. what are the values of ESM status registers when the problem happens?

  • we have two sets of code we are experimenting with

    one is the provided code in this post, and one is something we wrote based on that functionality 

    with or without JTAG attached 

    in our code we work correctly on a second manually applied reset, but generally never on a power on reset

    nPORRST is generated by a watchdog supervisor (pair of TPS3703) looking at correct level of 3.3, 1.2, and then held low for either 10 or 100 ms

    on nRST we have a 2.2K/10nF cap

    in this case it's manualReset-->TPS3703.MR-->nPORRST

    In the provided code we generally work correctly (that is proceed to main) in either case of power on, or manual reset however sometimes we also observe

    that sometimes the processor will take a data abort early on when attaching via the jtag, with PC at 0x10, but other times proceed on to main

    I'm still trying to get CP15 registers in the case where we have data abort, when in this state and using CCS

    going to CCS->Registers window->CP15 sometimes shows a list of undefined registers, or other times just does not let us open that tree of registers.

    in the case of the data abort the behavior is similar to this description

    https://e2e.ti.com/support/microcontrollers/hercules/f/312/t/680951?Data-abort-right-after-NPORST-enabling

     I've not looked at the 1.2/3.3/nPORRST timing it shows reset is low initially and is released after all voltages are up

    we have the rev B part

    I've also looked at the OSC clock provided to the part, and it seems to be up during the time the voltages are reaching their final levels

    so a couple questions ->

    (1) On our board we have nRST generated by 2.2K/10nF cap on nRST, on your dev board it's 10K/1uF, and on the launchpad it's something similar to ours

    On power on case does it matter when nRST is released ? Should it be before nPORRST, after or what ?

    (2) any ideas on the early data abort case ?

  • My comments below:

    1) On our board we have nRST generated by 2.2K/10nF cap on nRST, on your dev board it's 10K/1uF, and on the launchpad it's something similar to ours

    On power on case does it matter when nRST is released ? Should it be before nPORRST, after or what ?

    >> nRST is driven active LOW by the part when nPORRST is active and for some time after nPORRST is released (time specified in datasheet). Thereafter it needs to be pulled up so that the level on the nRST terminal stays above ViHmin (specified in datasheet as well).

    (2) any ideas on the early data abort case ?

    >> This occurs when there is an access to the CPU RAM without first initializing it (as in a push to stack, etc.). Make sure that the CPU RAM is initialized as the first step after initializing CPU registers.

  • We found the problem after some head scratching - it's exactly the case

    We had a code construct to write a register, but in building the value for that write we accessed memory space which was not initialized

    IE pre bss copy/constant copy was not yet run

    Moving that memory init to earlier on fixes the problem

    Normally in this situation one would see a wrong value built up for write, but in the case of this CPU the memory read generates an ECC fail

    I'll look a bit further through the dissasembly to see if was a stack access or constant access - I would not expect stack since a write happens first.

  • A stack write could cause this as well. Any write to RAM smaller than 64 bits causes a 64-bit read-modify-write operation (by default). This is done so that the correct 8-bit ECC per 64-bit data can be maintained. That read-modify-write operation causes a double-bit ECC error when the RAM is not initialized.