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: TMS570LC4357 launchpad - can run application only with debugger reset

Part Number: TMS570LC4357
Other Parts Discussed in Thread: HALCOGEN

Tool/software:

Hello,

I have strange issue that I started to see some time ago. I have working on a port of zephyr RTOS for TMS570, and things seem to be usually working fine, but I noticed that might be because my application works only immediately after the debugger flashes the code. If I power cycle the board, the ESM error LED is on, and a simple blinky program does not work. I am also not really able to connect the debugger at this point. I am using Halcogen generated code as reference for the soc initialization code, but it is not exactly the same.

I see chip errata advisory SSWF021#45, but my issue has a frequency of 100%, and happens if i even skip PLL init code..

Are there any general ideas as to what I should check? If I connect the debugger, launch the application, everything works well, I can even press the RESET or PORREST buttons, and it still works, but as soon as I power cycle the board, it is stuck, and I cannot connect debugger to inspect.

Thank you!

  • Hi Tavish,

    Is it possible to share your application? So that i can debug the same application on my launchpad and verify the behavior?

    --
    Thanks & regards,
    Jagadish.

  • Hello, sorry for such a long delay, I have some updates and further requests for help.

    First, I was able to resolve the original issue I had. The issue was due to VIM RAM being not initialized to the correct value, but I cannot point to the exact cause. I had to do two things: initialize VIM RAM using MBIST (which I understand needs to be done), but additionally, I had to set all the vectors to a valid function pointer, even though I do not use the VIM RAM at all. I have implemented what is called "legacy ARM interrupts" in the appnote regarding interrupt handling.

    Secondly, I have a Zephyr port for TMS570 that I've been working on https://github.com/zephyrproject-rtos/zephyr/pull/88741

    Firstly I would like to request review for this, secondly, the some of the code is adapted from what Halcogen generates, which is BSD 3-clause. Zephyr only accepts Apache-2.0 licensed code, and while BSD 3-clause is basically compatible, it is not exactly the same, and if we want to include that code in zephyr, it needs to be re-licensed to Apache-2.0. Can TI help with this? I think there is some Apache licensed code from TI in zephyr already.

  • I do still have some issues, and the debugger (XDS110 or JLINK) cannot always connect to target for me to investigate easily. For example, I have a delay in the init code, if I remove it, the CPU is stuck somewhere, and I cannot connect to it to investigate further. It does not happen if cacheEnable is not called.

    github.com/.../files

    I can provide you binaries for TMS570LC43 launchpad or build instructions for zephyr.

  • Hi Tavish,

    My apologies for the delayed response, i was off for some days and didn't get time to work on this issue again.

    Are you still stuck at same point? or do you make any progress.

    --
    Thanks & regards,
    Jagadish.

  • Hi Jagadish,

    I still have the two queries, as I mentioned, I am working on a zephyr RTOS port for TMS570, which is currently under review.

    First issue is: for me to be able to contribute this change to zephyr, I would like TIs support regarding re-licensing the HALCOGEN generated code (I use some) from BSD 2 clause to Apache-2.0 (which zephyr will accept). I'm not a lawyer, but they are basically compatible, however zephyr does need any contributions licensed to Apache-2.0 in the main repo. I have some assembly routines and pll errata handling that is still BSD-2-clause licensed.

    Secondly, I am asking to review the pull request as well. If you can review the PR, I would greatly appreciate it. Let me know if you want me to provide some specific information.

    Thanks
    Tavish Naruka

  • First issue is: for me to be able to contribute this change to zephyr, I would like TIs support regarding re-licensing the HALCOGEN generated code (I use some) from BSD 2 clause to Apache-2.0 (which zephyr will accept). I'm not a lawyer, but they are basically compatible, however zephyr does need any contributions licensed to Apache-2.0 in the main repo. I have some assembly routines and pll errata handling that is still BSD-2-clause licensed.

    TI provides a strong foundation for the software stack through HALCoGen (Hardware Abstraction Layer Code Generator) and the SafeTI Diagnostic Library. These software components provide low-level peripheral drivers, device initialization and diagnostic functions for Hercules MCUs. Since they have been developed by following the ISO 26262 and IEC 61508 safety standards, they can be used by the customer assist in the development of their functional safety systems. The software development process for these software components has been certified by TÜV NORD to meet ASIL D and SIL 3 levels of safety integrity. 

    Note that the software components itself are not certified.

    Please have a look at "User Guide of HALCoGen Software Safety Manual for Hercules Family of Microcontrollers". It includes a list of Misra rules followed for the SW development.

    Secondly, I am asking to review the pull request as well. If you can review the PR, I would greatly appreciate it. Let me know if you want me to provide some specific information.

    I will look into this.

    --
    Thanks & regards,
    Jagadish.