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.

SafeTI-HSK TMS570LS3137 HSK_Safety_Application

Other Parts Discussed in Thread: TMS570LS3137, HALCOGEN, SN65HVDA541-Q1

Hello

I am trying to use the SafeTI-HSK TMS570LS3137 with the HSK_Safety_Application project in the kit I have followed the user manual and this post after which I faced many compilation errors and missing header files and missing libraries. I have asked for help on this problem before, with no response.

I am now at the point of the project compiling but I now have a linker error.

Undefined symbol: HAS_EnterSafeState

First referenced in file: ./tasks/HAS_FaultInjection.obj

The “tasks” folder has been included in the build process, and EnterSafeState is defined towards the top of the file. Is there a working project of the HSK_Safety_Application that will work with CCS6, HalCoGen4 and Windows10 or is this an impossible task. Any advice on this topic will be appreciated.

Kind Regards,

Aaron

  • Aaron,

    I would start by downloading the latest code from the HITEX web page.  The disc may be out of date.

    SafeTI-HSK Download & Update.



    In the HSK_Safety_Application\tasks\HSA_FaultInjection.c file from that download - I don't see "HAS_Enter...".

    It's "HSA_Enter.."  so maybe updating to the current DVD image will solve this problem.


    Windows 10 is an unknown.   Seems to 'work' in most cases but it's not officially supported yet AFIK.

    And not clear that the HSK will be updated to Win10 if any updates are needed.   If you have trouble with the HSK GUI applicaiton in win 10 please try running in a compatability mode to Win7.

    -Anthony

  • Hello Anthony, thanks for getting back to me. I have downloaded the latest "Complete HSK dvd content" from the site you linked and I am still having the same problems as before. I have recorded the steps I have taken and the errors I am getting below.

    Downloaded SafeTI-HSK-DVD from (here) uninstalled old install. Open installation program  setup.exe “SafeTI™-HSK Software Installation" -> Install Software

    Open CCS6 -> Import… -> CCS Projects -> “C:\Program Files (x86)\Hitex\safeTI-HSK\Firmware-applications\Safety_Aplication\safetyApplication.zip” (dated: 14/06/2013) -> Discovered Projects: “HSK_Safety_Application” -> Finish

    1. Error: Missing dependences -> remove dependences

    2. Error: option --include_path is missing its parameter ‘dir’ (HSA_CommandHandler.c) -> remove missing include files (or ones pointing to the wrong place)

      • HSA_Safety_Application/SafetyLib/hal/include

      • HSA_Safety_Application/SafetyLib/safety_library/include

      • HSA_Safety_Application/TPSLib/include

    3. Error: cannot open source file “sl_types.h” -> find folder “C:\ti\Hercules\SafeTI Diagnostic Library\2.2.0\safety_library\include” -> include in project

    4. Error: cannot open source file “sl_sys_common.h” -> find folder “C:\ti\Hercules\SafeTI Diagnostic Library\2.2.0\hal\include” -> include in project

    5. Error: cannot open source file “reg_f021flash.h” (system.h) -> not found on whole file search of C:\ (only drive on PC)

    I have stopped there as I am not sure how to progress without editing the header files now

  • Aaron,

    the problem may be mixing the Hitek code w. the safety library code. Actually the hitex demo was created first with a preliminary / unfinished version of the safety library. I'm not sure if the DVD was ever updated to the current safety library.

    There is a demo app folder in the safety library - and there is an HSK version of the demo app there.
    That'll be more current in terms of compatibility with the actual safety library.

    If you've moved past playing w. the GUI to inject faults and measure response time on the HSK and you want to start w. your own application that uses the safety lib - then the demo from the latest version of the safety library may be a better starting point. especially if you are getting hung up in just builds.

    -Anthony
  • Hello Anthony, Thanks for the reply.

    I have found the TMS570LS3137_Hitex CCS6 project in the safeTI library but this does not seem to solve the problem. The project will now build and flash to the device and I can make changes in the HalCoGen project but I cannot get the CAN bus to send or receive.

    I have probed the U501 (SN65HVDA541-Q1) pin 8 -> CAN-EN which is being kept in a high state keeping the CAN bus in a suspended state. I have followed the path of the connection and it is being controlled by the other watchdog CPU (RM48L952ZWTT), does the “Hercules SafeTI Diagnostic Library” flash this CPU too?
  • Aaron,

    I suspect that the watchdog CPU isn't really driving this pin but instead monitoring this pin.

    The manual for the HSK   says:

    So I think it is more likely that you are missing the code to turn on the ENDRV in the TPS companion chip..

    other watchdog CPU (RM48L952ZWTT), does the “Hercules SafeTI Diagnostic Library” flash this CPU too?

      While I think it's the TPS that's driving the pin low,  to answer this question - no (but you need to be careful as well not to accidentally reprogram the monitor chip CPU!).

    So first, no the safety library doesn't actually flash anything.  You flash the safety library app into the board when you download the new program through CCS.

    The safety library program is written for the DUT processor, not the monitor processor though.

    There is a single USB port on the HSK, with USB HUB on board and two instances of the XDS100v2.  They should have serial numbers identifying which XDS00v2 is connected to the monitor and which is connected to the DUT - but if you don't pay attention to this and connect to the wrong CPU you might wind up accidentally reprogramming the monitor CPU.  In that case I believe the DVD download also includes the .out file for the monitor so you can restore it.
    Normally you would not touch the code on the monitor;  it's there to power the GUI and inject faults / log data back to the GUI.     But you could accidentally mess this up if you don't watch the XDS100v2 IDs.

    I think the ID is embedded into the CCXML file that comes w. the kit though.  So if you use those CCXML files you should be safe.   If you create a new one you may want to look at copying the correct ID into your CCMXL file so it always picks the right XDS100v2.    You basically have 2 XDS100v2s connected when the safety kit is plugged in and you can refer to this wiki page which explains how to pick one v.s. the other when more than one is connected.

  • Hello Anthony thanks for the reply.

    I am using the SafeTI Diagnostic Library v2.2.0 demo app for the TMS570LS3137_HitexKit which I can build and run on the application CPU (making sure to select the correct chip in the .ccxml file).

    I have found this post where the ENDRV pin is remaining in the incorrect state but I cannot even get to the first step of the work though suggested by Jean-Mark. The HALCoGen project I am using has been set up according to this guide. I have enabled and configured the SCI2 to run at a baudrate of 115200 with 2 stop bits and a length of 8 and selected the same settings in the terminal in code composer, yet I have no communication over SCI.

    When I pause the example code it is constantly stuck in the function: TPS_DriverInit -> TPS_GetCurrentTPSDeviceState -> Tpsif_GetRegister -> Tpsif_SendCommandOverSPI -> SendandRecieveDataTPS -> mibspilsTranserComplete

    TPS_DebugInit(), gioInit(), sciInit() and mibspiInit() have been called before TPS_DriverInit() is called. The exact code I am running can be found in the “safeTI Diagnostic Library\2.2.0\demo_app\HALCoGen\TMS570LS3137_HitexKit\” folder.

    The control monitor application has been flashed to the other RM48 chip and tested using the SafeTI HSK Monitor application so I don’t think this is the problem.

    Are there any known bugs with the demo applications that could be causing this problem or is something else wrong?

  • Hi Aaron,
    Try implementing the same using the CCS project at "safeTI Diagnostic Library\2.2.0\build\TMS570LS3137_HitexKit\" and see if it still gets stuck.
    For information on TPS Driver functionality in demo app, you can refer TPSDriver-User'sGuide.chm at "safeTI Diagnostic Library\2.2.0\docs\" folder.
    Regards, Vivs
  • Hello Vivs thanks for the reply,

    I have opened the file code composer project in that that folder and it opens up and uses the exact same code as the project I am already using as it is linking to folders.

    I believe the previous error may have been due to the companion chip not being active when the TMS application was trying to run. The terminal SCI issue was also caused by looking at COM6 and not COM4

    The TPS will pass the TPS_DriverEnable() function now but the device then resets and all debugging capability is lost around this point in the code.

    This is the output via the terminal, as you can see the device resets half way through and then disconnects from the PC

    Initialization of the TPS driver
    TpsIf_SendCommandOverSPI SPI ERR    4c
    TpsIf_SendCommandOverSPI  u8SPIPreviousStatus is  a4
    INIT_TEST PASS
    Setting DEBUG mode PASS
    TPS device is in diagnostic state  1
    TPS Device ID  1
    TPS Major Version  3
    TPS Minor Version  0ƒ
                         TPS_ConfigureSafetyCheckControl  1
    TPS_ConfigureSafetyCheckControl  0
    CRC calculation and enabling of crc failed
    TPS_FaultInjectCRC FAIL
    TPS_GetVMONStatus PASS
    TPS_TestErrorPinMonitoring not performed
    TpsIf_SpiIFTestPwmlow FAIL
    TpsIf_SendCommandOverSPI SPI ERR    cc
    TpsIf_SendCommandOverSPI  u8SPIPreviousStatus is  a1
    TpsIf_TestWrongCommandLogic PASS
    TpsIf_SendCommandOverSPI SPI ERR    cc
    TpsIf_SendCommandOverSPI  u8SPIPreviousStatus is  a1
    TpsIf_TestCommandParityLogic PASS
    AMUX diagnostics FAIL  0
    AMUX diagnostics FAIL  1
    AMUX diagnostics FAIL  2
    AMUX diagnostics FAIL  3
    AMUX diagnostics FAIL  4
    AMUX diagnostics FAIL  5
    AMUX diagnostics FAIL  6
    AMUX diagnostics FAIL  7
    DMUX TEST Passed
    TPS_RegReadBackandCompare FAIL
    Initialization of the TPS driver
    TpsIf_SendCommandOverSPI SPIPreviousStatus error  a4
    INIT_TEST PASS
    Setting DEBUG mode PASS
    TPS device is in diagnostic state  1
    TPS Device ID  1
    TPS Major Version  3
    TPS Minor Version  0
    TPS_ConfigureSafetyCheckControl  1
    TPS_ConfigureSafetyCheckControl  1
    CRC test passed
    TPS_FaultInjectCRC PASS
    TPS_GetVMONStatus PASS
    TPS_TestErrorPinMonitoring PASS
    TpsIf_SpiIFTestPwmlow PASS
    TpsIf_SendCommandOverSPI SPI ERR    c0
    TpsIf_SendCommandOverSPI  u8SPIPreviousStatus is  a1
    TpsIf_TestWrongCommandLogic PASS
    TpsIf_SendCommandOverSPI SPI ERR    c0
    TpsIf_SendCommandOverSPI  u8SPIPreviousStatus is  a1
    TpsIf_TestCommandParityLogic PASS
    AMUX diagnostics FAIL  0
    AMUX diagnostics FAIL  1
    AMUX diagnostics FAIL  2
    AMUX diagnostics FAIL  3
    AMUX diagnostics FAIL  4
    AMUX diagnostics FAIL  5
    AMUX diagnostics FAIL  6
    AMUX diagnostics FAIL  7
    DMUX TEST Passed
    TPS_RegReadBackandCompare PASS
    
    

    what does the comment in the code mean? and is there a workaround?

    Regards,
    Aaron

  • Hi Aaron,

    There are still open issues in the safety library - this one may be (not sure) in the readme.
    Did you ever get a resolution though? Noticed no activity on this thread for a while and wanted to see if it is still an open issue.