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.

TMDX570LC43HDK nError LED

Other Parts Discussed in Thread: TMDX570LC43HDK, TMS570LS3137, HALCOGEN

Hi,

I'm evaluating a TMDX570LC43HDK with respect to replacing our existing TMS570LS3137 design.

Whilst porting our existing bootloader and application firmware I observed some strange behaviour with the nError LED and CCS whilst trying to debug.

To simplify matters I created a build of the rtiBlinky project using HALCoGen 04.05.01 which I have attached.

1) When I debug this on the TMDX570LC43HDK the nError LED is off the first time the code is run. If I pause the code the restart button in CCS is greyed out as shown here   shouldn't this be available?. If I add a breakpoint to the code and run again when you hit the breakpoint the restart button is now available as expected.

2) After hitting the breakpoint if the restart button is pressed the code resets and the nError LED is now on, why as this has now reinitialised the device based on the HALCoGen code?

3) If I create a release build of the rtiBlinky project and program the TMDX570LC43HDK when the power is removed from the board and plugged back in the nError LED is always on, this does not look right can you explain this behaviour?

I'm using:

HALCoGen 04.05.01

CCS Version 6.1.1.00022 with all the latest updates installed.

Please help explain this behaviour?

Kind regards,

Stu

3010.rtiBlinky.zip

  • Hi Stu - I'll take a look at what you attached & see if I can figure it out.
    -Anthony
  • Hi Stu,

    1) I don't see it greyed out...

    2) I can repeat the issue, but if I do the restart the way I have conditioned myself to do there is no problem.
    LED doesn't come on.

    You need to avoid the restart button. It just puts the program back at main - it leaves all the hardware untouched.
    You need to always do a Run->Reset->System Reset and and then a Run->Go Main if you want consistent results.

    To illustrate - try running your code then when it's on the while(1) do a restart. Then look at the CPSR register in depth.
    See how the I bit is still '0' (IRQ interrupts enabled). The restart is just putting you back at the beginning of the program but with all the peripherals and CPU state 'different' than what it should be because it's not resetting them.

    3) so here's how to debug this.
    a) with an active debug session - disconnect cortex R5 target in CCS (Ctrl-Alt-C. Don't terminate the session)
    b) cycle your power till the red error light comes on.
    c) now connect the Cortex R (Ctrl-Alt-C again)

    You should have control of the cortex in the error state now and you can look at the ESM registers to see what is going on. I see a 0x08 in ESMSR2 which is a Cortex R fatal bus error according to the datasheet. Would need to do a little digging to figure out now why this is but that's the 'what' part.

    Best Regards,
    Anthony
  • Hi Anthony,

    Thanks for the quick response.

    1) Strange... this appears to be a GUI refresh problem in CCS. The Restart button is greyed out at the start of debugging (code uploaded to the device) then when you press play the restart button is available, then when you press pause it greys out again but if I right click in CCS, single step or place a breakpoint after pausing then the restart button is then available again. I'm running Windows 7 Pro 64 bit with CCS 6.1.1.00022 so installed CCS 6.1.2.00015 (not available via the update system?) and it still behaves the same. I then also tried on a Windows 10 Pro 64 bit machine with a clean install of CCS 6.1.2.0001 and don't have the issue so maybe it's something in my CCS debug config has got messed up, is there a way to do a "Clean reset" on CCS to see if that fixes my problem?

    2) I agree if I do a System reset and then a Code reset the Error LED turns off and the code will run with the error LED off. I see this a way I can do reset on this device without nError line issue. Although all my previous development with the TMS570LS3137 I always used the Code reset when I was performing simple checks and verification of some code and never had an issue before.

    3) So after following your steps my registers that have values for ESM1 in CCS are
    Stat2 = 0x00000008
    IntOffstHgh = 0x00000024
    LtCntPre = 0x00003FFF
    ShdwStat2 = 0x00000008
    So it also appears to be also reporting a Fatal bus error, so that's good at least we can both replicate the same condition ;-)

    Kind regards,
    Stu
  • Hi Stu,

    I think you'll find when moving from 3137 -> 4357 that the safety features of the 4357 are a little more 'advanced'.

    For example on the 4357 ECC on the memory is always enabled (which is why the flash looks 'funny' when erased).
    And you'll see other subtle differences like ECC on some of the peripheral memorys, LBIST for the N2HET ...
    So makes sense to me that it needs a more complete reset to start correctly.

    If you don't like doing the system-reset + run main every time you can add a GEL menu item that does both features.
    Look at the existing GEL as a template .. you can see how menu items are added.

    Regarding the CCS install - I don't know of any easy button for resetting it to it's original state.
    I always uninstall then reinstall. If I am doing this a lot I download the whole 'install dvd' and unzip it somewhere to avoid
    the download every time. It's not too painful if you only install a single ISA support. If you install all the ISAs it can take a while.
  • Hi Anthony,

    Yes I'm quickly learning that the 4357 is quite different than the 3137 especially regarding the F021 Flash API and ECC as this is when I first started to notice the nError issues I was having. I'll look into the GEL menu item to see if I can figure out how to add a macro style system and code reset.

    I have done a complete uninstall of CSS and the debugger serial comms driver (I'm using the built in USB port debugger on the HDK). I then did a clean install of CCS 6.1.2.00015 with a brand new workspace, applied all the updates then imported the rtiBlinky project and still have the same issue with the reset button. It definitely appear to be a problem in CCS on my Win 7 laptop as all the other buttons work fine going active and inactive as debugging is paused and resumed just the Restart button that's the problem.
    I also tried unplugging all other hardware from my laptop in case there was some sort of interaction going on with one of my other FTDI based devices, but still the same problem?

    Keep me posted on the Fatal bus error as that is currently my main concern.

    Thanks,
    Stu
  • Stu,

    Thanks for reminding me.  I missed the best person to ask about the error but talked to another colleague and we started noticing that there isn't a flash ECC error in the table so we think it's probably just that.

    I know you had auto-generate ECC turned on but maybe it's some alignment or fill issue in the project ... when I used the linker generated ECC method I no longer get the nERROR LED.  

    Here is the modified file.

    0675.rtiBlinky.zip

    I didn't rebuild 'Debug'  just 'Release'  so you can try the .out in release as is but should rebuild the debug profile.


    For linker generated ECC you have to flip some switches in the flash programming options.    Notably turn off auto-generated ECC

    and turn off "Verify" (set to none) because with linker ECC first all the main array is programmed then all the ECC is programmed, but

    when you verify during programming it verifies as it goes - so verify during programming will always fail w. linker ECC.

    There are some instructions here:  

    as well.  

    Linker ECC seems to work much better than other methods on the 4357.

    Best Regards,
    Anthony

  • Hi Anthony,

    Thanks that's a great link I'd not seen that yet.

    Ok so it was related to the Flash ECC. The rtiBlinky project now runs as Release without the Error LED and also allows code restarts in Debug without the Error LED when used with the Linker generated ECC. I assume originally this must have been a speculative pre-fetch by the CPU that read from erased flash on start up which caused the Fatal bus error?

    I'll mark the above response as the Answer and get back to you if I have any more issues.

    I still don't understand the issue with CCS Restart button but if you have any other ideas please let me know.

    Thanks again for all your help :)
    Stu
  • Thanks Stu,

    I don't know about the CCS issue. If you want to track that down - there is actually a CCS forum monitored by the software development tools org. and they've got the experts in all things related to the IDE.

    That forum is e2e.ti.com/.../ -- so you could try posting just the Restart button issue there and see what you get as a response.

    Thanks and Best Regards,
    Anthony