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.

CODECOMPOSER: The results of SOC Initialization Script sometimes fail.

Part Number: CODECOMPOSER
Other Parts Discussed in Thread: UNIFLASH

Tool/software:

I am referring to 'AM243x MCU+ SDK  11.00.00 -> Getting Started -> EVM Setup -> Additional Details -> SOC Initialization -> SOC Initialization Using CCS Scripting -> Run the SOC Initialization Script'

When ' loadJSFile "C:/ti/mcu_plus_sdk_{soc}_{sdk version}/tools/ccs_load/am243x/load_dmsc_hsfs.js" ' is executed, it sometimes fails.

Case1:

After ' Resetting self cluster ... ' is displayed, a timeout occurs.

com.ti.debug.engine.scripting.Target.run(): Timed out after 20000ms (C:\ti\mcu_plus_sdk_am243x_11_00_00_15\tools\ccs_load\am243x\load_dmsc_hsfs.js#120)

Case2:

The following error occurs:

MAIN_Cortex_R5_0_0: Error: (Error -1141 @ 0x1FE) Device is not responding to the request. Reset the device, and retry the operation. If error persists, confirm configuration, power-cycle the board, and/or try more reliable JTAG settings (e.g. lower TCLK). (Emulation package 20.0.0.3178)

We checked the signal integrity of the JTAG waveform and believe there are no particular issues.

Could you please provide the possible causes and countermeasures?

  • Hi Futoshi,

    For the case #1, you can ignore the timeout error. Once you see the message "Resetting to self cluster ..", the EVM is initialized and you can load the example.

    For the case #2, the error is most likely to come when the SOC is not initialized properly and the CPU is not clocked.

    Regards,

    Tushar

  • Hi Tushar,

    For the case #2,

    After ' Resetting self cluster ... ' is displayed, the following error occurs:

    MAIN_Cortex_R5_0_0: Error: (Error -1141 @ 0x1FE) Device is not responding to the request. Reset the device, and retry the operation. If error persists, confirm configuration, power-cycle the board, and/or try more reliable JTAG settings (e.g. lower TCLK). (Emulation package 20.0.0.3178)

    I want to execute ' SBL JTAG Uniflash '

    The error occurs, but ' SBL JTAG Uniflash ' can be executed without any issues afterward.

    Is it safe to assume there is no problem?

  • Hi Futoshi,

    Is this error coming when you connect with R5F0-0 core or it comes even before connecting to the core?

    Regards,

    Tushar

  • Hi Tushar,

    I don't understand when I connect with R5F0-0 core.

    How can I know if the connection was successful?

    When ' loadJSFile "C:/ti/mcu_plus_sdk_{soc}_{sdk version}/tools/ccs_load/am243x/load_dmsc_hsfs.js" ' is executed, ' Resetting self cluster ... ' is displayed and then the error message displayed. 

    Regards,

    Futoshi

  • Hi Futoshi,

    Looks like you are getting error message even without connecting to the core, if this is the case you can ignore the error message by connecting the core and load examples.

    Instead of running the script, you can connect to R5F0-0 core after power cycle and load the sciclient_ccs_init.out binary directly to the core. It will initialize the SoC.

    Regards,

    Tushar

  • Hi Tushar,

    I checked the contents of 'load_dmsc_hsfs.js'

    Command ' dsMCU1_0.target.connect();' was executed.

    Therefore, the error occurred after connecting to the R5F0-0 core.

    The error occurs after "Happy Debugging!!" is displayed.

    Is it reasonable to assume that the initialization was completed without any issues?

    An error message is displayed, but since ' SBL JTAG Uniflash ' executes without any issues afterward, is it acceptable to ignore the error message?

    Regards,

    Futoshi

  • Hi Futoshi,

    Is it reasonable to assume that the initialization was completed without any issues?

    Yes, if you see "Happy Debugging" or "Resetting Self Cluster " message is coming. It means the SoC initialization is completed and you can ignore the errors.

    Regards,

    Tushar

  • Hi Tushar,

    I understand that it is okay to ignore the errors in both Case 1 and Case 2.

    Are the errors caused by a bug?

    Is there a way to avoid the errors?

    Regards,

    Futoshi

  • Hi Futoshi,

    Is there a way to avoid the errors?

    Please refer method suggested at https://e2e.ti.com/.../5813039 

    Regards,

    Tushar

  • Hi Tushar,

    Tushar Thakur said:

    Instead of running the script, you can connect to R5F0-0 core after power cycle and load the sciclient_ccs_init.out binary directly to the core. It will initialize the SoC.

    Can you explain exactly how to do it?

    Regards,

    Futoshi

  • Hi Futoshi,

    Please refer am6411-error-to-load-file-load_dmsc_hsfs-js for steps.

    Regards,

    Tushar

  • Hi Tushar,

    I tried the method you suggested.

    Sometimes, the error in CASE2 occurs.

    ' Resetting self cluster ... ' is displayed and then the error message displayed. 

    Is there a way to avoid the errors?

    Regards,

    Futoshi

  • Hi Futoshi,

    This is the most common issue, happens if the JTAG is not properly connect, loose cables. Power cycle the EVM or reconnect the JTAG cable will help.

    Please refer TROUBLESHOOT_ISSUES for details.

    Regards,

    Tushar

  • Hi Tushar,

    It doesn't seem to be a cable connection issue.

    Even after an error occurs, 'SBL JTAG Uniflash' runs without any issues without reconnecting the cable.

    Even after replacing the XDS110 and cable and the CPU-mounted board, the error sometimes occurs.

    Errors still occur even after lowering the TCLK frequency.

    Are there any other ways to avoid the error?

    Regards,

    Futoshi

  • Hi Futoshi,

    If you see the message "Device is not responding to the request", it means the attempt to halt the core fails.

    These are variations of the above error that happen after a successful connection, where the code is put to run but any attempts to halt it are being blocked by a memory bus contention. This is an unrecoverable error that prevents the JTAG debugger from halting the core. It will require either issuing a System Reset, a board Hardware reset or power cycle.

    Please refer device-hung for details.

    Regards,

    Tushar

  • Hi Tushar,

    I understand what to do when an error happens.

    I want to prevent the error from occurring.

    Is there any way to find out the cause?

    Regards,

    Futoshi

  • Hi Futoshi,

    As mentioned in my previous reply. This is an unrecoverable error that prevents the JTAG debugger from halting the core. It will require either issuing a System Reset, a board Hardware reset or power cycle.

    There is no way to avoid the issue.

    Is there any way to find out the cause?

    The possible root causes are listed in the link provided in previous reply.

    Regards,

    Tushar

  • Hi Tushar,

    I referred to 'Debugging JTAG'

    I executed the command 'C:\ti\ccsxxxx\ccs\ccs_base\common\uscif\dbgjtag -f @xds110 -S givendata,repeat=0' described in 'Hardware checklist'.

    As a result, no FAIL occurred.

    Are there any other ways to avoid the error "Device is not responding to the request" ?

    Regards,

    Futoshi

  • Hi Futoshi,

    Please refer the below image.

    Regards,

    Tushar

  • Hi Tushar,

    I’m sorry if I haven’t been able to express myself clearly due to my limited English skills.

    The error occurs when the following steps are performed.

    1. Power ON

    2. Launch CCS

    3. Select ccxml and execute 'Launch Selected Configration'.

    4. Connect to R5F0-0 core after power cycle and load the sciclient_ccs_init.out binary directly to the core.

    5. Click the Resume button

    At this time, sometimes the error occurs.

    I don't believe I am performing any actions that would cause the error.

    Are there any ways to avoid the error?

    I want to know how to avoid the error, not how to deal with it after it happens.

    Regards,

    Futoshi

  • Hi Futoshi,

    I have not faced this issue till now while performing the above method. Can you please provide screen recording of the CCS window when the issue happens?

    Regards,

    Tushar

  • Hi Tushar,

    I'm sending you a screen recording of the issue.

    Regards,

    Futoshi

  • Hi Futoshi,

    I have tried at my end but not able to reproduce the issue.

    I am attaching the sciclient_ccs_init binary below. Please try to load the below binary and let me know if this works.

    Binary - sciclient_ccs_init.release.out

    Regards,

    Tushar

  • Hi Tushar,

    I used the file you provided.

    The result is the same. Sometimes, the error occurs.

    Executing the steps below results in an error roughly 2 times in 20 attempts.

    1. Power ON

    2. Launch CCS

    3. Select ccxml and execute 'Launch Selected Configration'.

    4. Connect to R5F0-0 core after power cycle and load the sciclient_ccs_init.out binary directly to the core.

    5. Click the Resume button.

    At this time, sometimes the error occurs.

    6. Close the CCS.

    7. Power Off

    Steps 3 to 5 are performed according to the screen recording I shared.

    There are cases where no errors occur even after 10 attempts. However, errors tend to occur approximately 2 times out of every 20 attempts.

    Regards,

    Futoshi

  • Hi Futoshi,

    I have seen the video and looks like you are not doing CPU reset before loading the sciclient_ccs_init.out binary.

    Please refer the below video.

    Please let us know if you still face the issue.

    Regards,

    Tushar

  • Hi Tushar,

    I have updated the procedure to include a reset.

    The result is the same. Sometimes, the error occurs.

    Regards,

    Futoshi

  • Hi Futoshi,

    Can you please try with different AM243x SoC and let us know the result?

    Regards,

    Tushar

  • Hi Tushar,

    I tried with a different board.

    The result is the same. Sometimes, the error occurs.

    Regards,

    Futoshi

  • Hi Futoshi,

    As the cause of error is memory bus contention or improper power supply when the hardware is accessed. As the error is not reproduced every time, I assume the binary is okay and works fine. Please check for the proper power supply for the hardware connected. 

    There is no workaround to available for the issue caused by improper power supply.

    Regards,

    Tushar

  • Hi Tushar,

    I executed the command 'C:\ti\ccsxxxx\ccs\ccs_base\common\uscif\dbgjtag -f @xds110 -S givendata,repeat=0' described in 'Hardware checklist'.

    As a result, no FAIL occurred.

    By executing the above command, is it possible to determine whether the power supply is improper?

    Regards,

    Futoshi

  • Hi Futsohi,

    As a result, no FAIL occurred.

    Please refer the below description shared in above replies.

    Regards,

    Tushar

  • Hi Tushar,

    I’m sorry if I haven’t been able to express myself clearly due to my limited English skills.

    I think executing the above command with an improper power supply will result in an error.

    So, I consider the power supply to be appropriate.

    Is there any other way to check whether the power supply is improper?

    Regards,

    Futoshi

  • Hi Futoshi,

    I can see even when the error occurs the binary is able to execute successfully, for me it's not the problem with binary but with the debugger. The debugger is not able to respond to some request and throws the error.

    You can ignore the error, the EVM is initialized. 

    Regards,

    Tushar

  • Hi Tushar,

    Why do problems with the debugger happen? Can't they be avoided?

    Could there be a bug in the debugger itself?

    Regards,

    Futoshi

  • Hi Futoshi,

    I am routing your query to CCS team for further comment.

    Regards,

    Tushar

  • Kawarazaki-san,

    Why do problems with the debugger happen? Can't they be avoided?

    The debugger needs the device in the proper state for reliable JTAG communication. If the device is not in the proper state, then the debugger communication with the device over JTAG will be disrupted and and such errors occur.

    Could there be a bug in the debugger itself?

    Possibly. But more often the issue is with the device state.

    Are you using a custom board or a TI LaunchPad/EVM?

    Thank you

    ki

  • Hi Ki,

    I am using a custom board.

    I will look into whether anyone in our company has an EVM.

    I’m going to test it using the EVM.

    Regards,

    Futoshi

  • I am using a custom board.

    Thank you for confirming. The error you see can have numerous root causes. The most common case is when the device goes into a bad state. Because the issue is intermittent, there can be some stability issue withe the running program on the device or possibly some hardware stability issue. I will defer to the device experts for further suggestions.

  • Hi Ki,

    I used an EVM.

    The result is the same. Sometimes, the error occurs.

    We would appreciate further support from the device experts.

    Regards,

    Futoshi

  • Hi Ki,

    I used an EVM.

    The result is the same. Sometimes, the error occurs.

    We would appreciate further support from the device experts.

    Regards,

    Futoshi

  • Hi Kawarazaki-san,

    Did you try with another debugger, ribbon cable and USB cable? Did you try even with another PC/laptop? I have encountered unreliable USB ports

     in the past.

  • Hi Stanislav,

    Different cables and related equipment were used in the past, but they yielded the same result.

    Although others are using different equipment, the same error still occurs occasionally.

    Regards,

    Futoshi

  • Hi Kawarazaki-san,

    Sorry for late reply.

    We have tested this internally. This is reproducible on EVM by running same binary repeatedly. The occurrence is random and the frequency is roughly once out of 10 times.

    What we found is, even when this issue occurs, the SoC is initialized and the code executes completely. That is, even when the message is displayed, it doesn't affect functionality. Root cause for the message could be some instability in the JTAG debugger hardware, debugger firmware, or debugger software/PC driver.

    Regards,

    Stan

  • Hi Stanislav,

    Thank you for your message.

    Do you think there is any chance this issue could be resolved in the future, or is it something that cannot be fixed permanently?

    Regards,

    Futoshi

  • Kawarazaki-san,

    This is limited to usage in debug mode. Since this does not impact normal runtime functionality and initialization can still complete there is no plan to further resolve at this time.

    Thanks,

    Chris

  • Hi Stanislav,

    Thank you for your message.

    Futoshi