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.

CCS/TMS320C6748: Error connecting to the target: (Error -6311) PRSC module failed to write to a register. (Emulation package 8.1.0.00007)

Part Number: TMS320C6748
Other Parts Discussed in Thread: OMAP-L138, OMAPL138

Tool/software: Code Composer Studio

Dear TI,

Hope you are fine.I am facing the issue when loading the starterware gpio code in TMS320C6748 DSP Processor.Following is the error which is mentioned below.

ICEPICK_C: Output: Target Connected.
ICEPICK_C: Output: ---------------------------------------------
ICEPICK_C: Output: Memory Map Cleared.
ICEPICK_C: Output: ---------------------------------------------
ICEPICK_C: Output: Memory Map Setup Complete.
ICEPICK_C: Output: ---------------------------------------------
ICEPICK_C: Trouble Reading Memory Block at 0x1c10800 on Page 0 of Length 0x4
ICEPICK_C: GEL: Error while executing OnTargetConnect(): Target failed to read 0x01C10800
at (*((unsigned int *) ((0x01C10000+0x800)+(4*LPSC_num)))&0x1F) [C6748_LCDK.gel:845]
at PSC0_LPSC_enable(0, 0) [C6748_LCDK.gel:488]
at PSC_All_On() [C6748_LCDK.gel:243]
at OnTargetConnect()
C674X_0: Error connecting to the target: (Error -6311) PRSC module failed to write to a register. (Emulation package 8.1.0.00007)

The error mentioned above is in gel file (C6748_LCDK.gel).Any solution for this problem?

With Regards,

Bilal.

  • Hello,

    Can you confirm the boot mode is not set to NAND or MMCSD and there isn't code already running on the device? 

    Also, can you please run the debug GEL file and post the output here. Instructions on running it can be found in the Debugging Bootloader section of the following app note.

    OMAPL138/C6748 ROM Bootloader Resources and FAQ

    Regards,
    Sahin

  • HI Sahin,

    Hope you are fine.Yes it is confirmed that boot mode is neither set to nand nor to sd and there is no code running on the device.By default i set the boot mode to emulation debug.Last thing is that when i run the code in debug mode it will give me the same error i.e 

    ICEPICK_C: Output: Target Connected.
    ICEPICK_C: Output: ---------------------------------------------
    ICEPICK_C: Output: Memory Map Cleared.
    ICEPICK_C: Output: ---------------------------------------------
    ICEPICK_C: Output: Memory Map Setup Complete.
    ICEPICK_C: Output: ---------------------------------------------
    ICEPICK_C: Trouble Reading Memory Block at 0x1c10800 on Page 0 of Length 0x4
    ICEPICK_C: GEL: Error while executing OnTargetConnect(): Target failed to read 0x01C10800
    at (*((unsigned int *) ((0x01C10000+0x800)+(4*LPSC_num)))&0x1F) [C6748_LCDK.gel:845]
    at PSC0_LPSC_enable(0, 0) [C6748_LCDK.gel:488]
    at PSC_All_On() [C6748_LCDK.gel:243]
    at OnTargetConnect()
    C674X_0: Error connecting to the target: (Error -6311) PRSC module failed to write to a register. (Emulation package 8.1.0.00007)
    C674X_0: Error connecting to the target: (Error -6311) PRSC module failed to write to a register. (Emulation package 8.1.0.00007)

    So ,in this case it is difficult for me to run gel file in debug mode and post the output to you.Please provide me the necessary information to resolve this issue.

    With Regards,

    Bilal.

  • Hi Sahin,

    Hope you are fine.The output of the debug GEL file is mentioned below.

    C674X_0: GEL Output:
    ---------------------------------------------
    C674X_0: GEL Output: | Device Information |
    C674X_0: GEL Output: ---------------------------------------------
    Run_All() cannot be evaluated.
    Could not read 0x01C14018: target is not connected
    at GEL_TextOut("DEV_INFO_00 = %x\n", 0, 0, 0, 0, *((unsigned int *) (0x01C14000+0x018))) [OMAPL1x_debug.gel:300]
    at Print_Device_Info() [OMAPL1x_debug.gel:64]
    at Run_All()C674X_0: GEL Output:
    ---------------------------------------------
    C674X_0: GEL Output: | Device Information |
    C674X_0: GEL Output: ---------------------------------------------
    Run_All() cannot be evaluated.
    Could not read 0x01C14018: target is not connected
    at GEL_TextOut("DEV_INFO_00 = %x\n", 0, 0, 0, 0, *((unsigned int *) (0x01C14000+0x018))) [OMAPL1x_debug.gel:300]
    at Print_Device_Info() [OMAPL1x_debug.gel:64]
    at Run_All()C674X_0: GEL Output:
    ---------------------------------------------
    C674X_0: GEL Output: | Device Information |
    C674X_0: GEL Output: ---------------------------------------------
    Run_All() cannot be evaluated.
    Could not read 0x01C14018: target is not connected
    at GEL_TextOut("DEV_INFO_00 = %x\n", 0, 0, 0, 0, *((unsigned int *) (0x01C14000+0x018))) [OMAPL1x_debug.gel:300]
    at Print_Device_Info() [OMAPL1x_debug.gel:64]
    at Run_All()

    With Regards,

    Bilal.

  • Bilal,

    Some things:

    Which debug probe are you using? Do you have another one you can try with? If you're unable to connect with another debug probe then it most likely related to a power issue.

    Is there an E suffix on your device as shown in the image below? This would denote a secure part which requires a different debugging procedure. 

    When you run "Test Connection" in your target configuration, does it pass? If so, please get the core status by following the steps in the page below. This will tell you if the device is in reset or powered down.


    Also, please go through the following JTAG debugging guide.

    Debugging JTAG


    Hope this helps.

    Regards,
    Sahin

  • Hi sahin,

    Hope you are fine.The debug probe that we are using is xds200.The jtag integrity scan is  succeeded. When loading the program it gives the above mentioned error.Yes there is a E suffix on our custom board .I have check the power sequence,clock oscillator and reset signal All are ok.

    With regards,

    Bilal.

  • Bilal,

    As Sahin mentioned, the PRSC errors are mostly caused by the hardware - power is the usual root cause. 

    If the exact same configuration works for an EVM or LCDK, then this obviously rules out any issues with the host and the Debug Probe. 

    To that effect, I would keep the configuration stable during the tests, so you can minimize the changing boundary conditions - the last screenshot shows you using a different initialization file [OMAPL1x_debug.gel], but chances are that this will not work properly. 

    Also, the last test is what was recommented by Sahin: the core status, which the most up-to-date reference is section 7.5.7 of the CCS User's Guide available in the CCS online help (menu Help --> Contents) or at the link below. 

    https://software-dl.ti.com/ccs/esd/documents/users_guide/index_debug.html 

    Hope this helps,

    Rafael

  • The E suffix indicates a secure part. You will need to boot the device in non-secure mode to unlock the JTAG. Please see https://processors.wiki.ti.com/index.php/Basic_Secure_Boot_for_OMAP-L138_C6748

    Regards,
    Sahin

  • Hi sahin,

    Ok i will do non secure mode to unlock the jtag .Last thing tell me where gel file will be placed (icePick_c or C674x)? in target configuration setting.

    Regards,

    Bilal

  • C674X_0

    Regards,
    Sahin

  • Hi sahin,

    Hope you are fine.I am using secure custom board(TMS320C6748EZWT E).

    1)  I Create a dummy project.

    2) Build and generate *.out

    3) Convert into AIS signed binary using "SecureHexAIS_OMAP-L138.exe" tool

    Ex:  

    SecureHexAIS_OMAP-L138.exe -ini test_modi.ini -otype binary -o gpio.bin gpioLed.
    out

    output is as follow:

    C:\ti\C6748_StarterWare_1_20_04_01\tools\C674x_OMAPL1x_Generic_Security_Flash_Bo
    ot_Utils\OMAP-L138_Secure_FlashAndBootUtils_trunk\OMAP-L138_Secure\GNU\AISUtils>
    SecureHexAIS_OMAP-L138.exe -ini test_modi.ini -otype binary -o gpio.bin gpioLed.
    out
    -----------------------------------------------------
    TI Secure AIS Hex File Generator for OMAP-L138
    (C) 2011, Texas Instruments, Inc.
    Ver. 1.25
    -----------------------------------------------------


    Creating boot image for a generic secure device.
    INFO: Boot exit type has been selected as NONSECURE.
    WARNING: Encrypted Key Header data is absent - generating plaintext version.
    The Customer Encryption Key will be transferred in plaintext!
    INFO: Current SHA algorithm is SHA256.
    Begining the Secure AIS file generation.
    AIS file being generated for bootmode: UART.
    Signature Hash: AB-30-16-CE-DC-2A-10-CA-19-B7-F5-8D-45-C0-A1-17-51-0F-89
    -7A-D4-4F-10-16-BB-F2-1E-2C-20-08-D4-EA
    Signature Byte Count = 68
    Signature Hash: 9E-ED-33-13-EB-53-84-CC-9B-5B-43-49-E9-2E-54-BB-EE-F2-09
    -98-54-2F-50-12-90-6E-01-19-43-83-25-52
    Signature Byte Count = 16
    Signature Hash: 35-96-3B-5C-0D-36-89-8B-E3-BE-3F-A6-99-63-67-98-F8-78-23
    -76-12-B2-6A-29-B0-B1-7A-7A-52-99-76-69
    Signature Byte Count = 24
    Signature Hash: F4-1C-D9-79-37-3E-30-4E-68-25-B7-5F-60-AE-DC-FB-A3-36-AF
    -52-F2-D5-EE-BD-80-D1-57-2C-CF-F3-07-B5
    Signature Byte Count = 40
    Signature Hash: 35-6D-A7-4D-37-26-3E-38-AE-0B-0C-DA-91-73-68-63-4A-10-3C
    -3A-59-3B-0A-76-4F-88-63-53-4A-FC-F5-DF
    Signature Byte Count = 24
    Signature Hash: 30-2A-47-6B-92-ED-D0-E2-2A-78-B0-F3-5B-73-E3-D7-8D-7A-70
    -D2-AE-24-3D-16-9A-14-7D-3F-3D-13-FC-7F
    Signature Byte Count = 12
    Signature Hash: 44-BA-AD-61-79-77-DC-E8-5E-17-C3-49-91-6F-9E-01-48-9D-10
    -AD-11-4B-41-56-72-1E-A6-F4-E6-35-3A-38
    Signature Byte Count = 16
    Signature Hash: 8A-DD-4B-C8-83-56-4A-0F-B3-DB-14-06-79-B5-6D-A3-44-7B-4B
    -E8-BB-1A-C1-90-EF-76-CC-0E-0B-8B-52-22
    Signature Byte Count = 16
    Signature Hash: D7-1D-EB-18-0F-32-8E-F9-C3-5B-12-FE-27-B9-FE-C9-59-43-7E
    -9F-7C-E9-87-BA-EE-EA-74-B0-CE-A7-D2-E3
    Signature Byte Count = 16
    Signature Hash: B8-13-64-A6-66-78-FC-FE-B8-FA-42-6F-65-63-06-E0-27-34-E0
    -A4-BE-59-02-9F-95-3D-45-94-8A-C2-66-C5
    Signature Byte Count = 16
    Signature Hash: 5D-7A-14-49-19-41-A0-56-09-FB-61-D6-1F-1C-B1-62-DC-FD-D9
    -58-94-29-81-21-C9-6D-F4-7E-8B-59-09-C0
    Signature Byte Count = 16
    Signature Hash: F1-2D-96-75-54-4C-BB-5B-6E-CE-BB-8A-5B-EE-06-3A-5A-82-F4
    -79-5F-05-D4-A1-C2-06-BB-0D-B5-B6-B9-AA
    Signature Byte Count = 16
    Signature Hash: ED-EB-68-A9-F3-98-FD-90-4B-85-2C-3D-7A-F6-A5-4F-87-29-91
    -2F-C3-24-6B-5A-37-DA-C5-4F-0F-8E-FF-17
    Signature Byte Count = 24
    Signature Hash: 12-59-5B-FB-12-5D-D8-72-2B-26-CF-4F-AF-9C-7E-CF-89-04-34
    -47-84-E1-C0-EE-E1-AF-45-7E-B9-4F-E0-D4
    Signature Byte Count = 12
    Signature Hash: 4A-B8-A9-7F-B7-78-94-63-24-1C-01-C7-E0-AC-8D-5B-2D-9B-F8
    -18-4A-28-21-54-A0-5C-9F-6E-AC-F3-79-B1
    Signature Byte Count = 20
    Signature Hash: 4F-F9-85-71-26-E0-43-FB-7C-6D-12-3F-40-B9-D5-82-37-E8-54
    -38-93-33-78-86-34-BF-19-F6-83-86-CA-A9
    Signature Byte Count = 20
    Signature Hash: 44-D3-87-FA-A1-0D-53-95-E8-62-37-76-E1-CE-6C-01-3B-AE-C6
    -3A-49-35-1D-AF-84-2D-F4-44-CB-99-C6-B3
    Signature Byte Count = 20
    Signature Hash: 64-90-87-3E-CB-E8-A4-45-24-33-8C-69-97-EB-E0-A8-C5-67-F9
    -12-AD-B3-26-DF-C7-5D-C0-91-F6-7D-59-84
    Signature Byte Count = 20
    Signature Hash: 02-C4-3F-42-0E-FF-C6-54-87-9F-1B-AB-01-11-35-04-A4-0E-72
    -C4-80-31-5C-68-66-58-0F-7E-AE-33-47-16
    Signature Byte Count = 20
    Signature Hash: 2A-9C-BE-8E-50-6A-AB-3F-92-34-B5-5F-78-78-0B-78-51-63-93
    -84-89-99-F4-2F-F6-1D-1B-30-7A-5F-74-0A
    Signature Byte Count = 20
    Signature Hash: 54-50-51-5A-99-01-BE-92-27-0C-AE-E4-6A-2C-5D-87-DC-AA-C2
    -6F-8B-97-23-D8-8E-37-4F-3C-EB-F0-A6-3A
    Signature Byte Count = 20
    Parsing the input object file, gpioLed.out.
    Encrypting section .text, since ALL was specified for encryptSections in ini fil
    e.
    Encrypting section .switch, since ALL was specified for encryptSections in ini f
    ile.
    Encrypting section .cinit, since ALL was specified for encryptSections in ini fi
    le.
    Signature Hash: 30-CC-AF-11-08-15-EA-14-54-18-3E-2C-00-BA-15-9F-8B-DD-C1
    -8E-95-82-86-4D-46-4D-50-05-6B-AD-19-DE
    Signature Byte Count = 3808
    AIS file generation was successful.
    Wrote 4968 bytes to file gpio.bin.
    Conversion is complete.

    C:\ti\C6748_StarterWare_1_20_04_01\tools\C674x_OMAPL1x_Generic_Security_Flash_Bo
    ot_Utils\OMAP-L138_Secure_FlashAndBootUtils_trunk\OMAP-L138_Secure\GNU\AISUtils>

    Then i  load the "hello.bin" via 'GenericSecureUartHost.exe" tool, it will unlock the JTAG and run the code on processor.

    output is as follow:

    I am using UART2(BOOT[7:0]=xxx1 0100) for booting in my custom board.When I reset the board it will not move further.Plz tell me the problem ?

    The desired output is:

    With regards,

    Bilal.

  • Dear TI,

    Hope you are fine. I am stuck in the below mentioned figure.

    Following is the attached ini file

    5810.OMAP-L138_generic_secure.ini

    I didn't get any further reply for the TI about this problem.I have seen this problem into many forums but didn't get any solution for this problem. following is the output of docklight with out using uart boot host.

    Please provide me the necessary solution regarding to this problem.

    Regards,

    bilal.

  • Hi Bilal

    Sorry that the debug on this has taken longer than expected. For the longest time we did not realize that you are using a secure variant of the device.

    Now that is understood and will need to have this post handed over to our security expert who is currently out of office till early next week. 

    I will assign this post to them, and you can expect some additional guidance some time early next week.

    We regret the delay.

    Regards

    Mukul 

  • Hi Mukul,

    Hope you are fine.I will wait for the reply of security expert.

    With Regards,

    Bilal.

  • Dear TI,

    Hope you are fine.This was an alarming situation for us.We have 4 secure custom boards that is manufactured from china and we want to bring up the secure dsp .But we are already late in figuring out that we have bring the secure dsp instead of nonsecure dsp.I am still waiting for the security expert which is coming on this week but there is no reply for their end and 2 days have been gone.Please tell us that we can esaily bring up the secure board or not ?otherwise we took some decision to bring the boards again to the china for rework.which is too hactic for us and waste of money and time.Hope you will understand.Please provide the necessary information as soon as possible that we will figure out the problem in this week .

    With Regards,

    Bilal Zahoor Ahmed.

  • Hi Bilal

    Sorry for the late response. We should be able to start providing some additional guidance on this starting tomorrow.

    Regards

    Mukul 

  • Bilal,

    Sorry for the delay in getting to this thread. 

    You seem to be trying this on custom platform so this could be a clocking or a voltage rail issue rather than to do with secure silicon. We have used that same INI file on multiple TI EVMS and LCDK platforms and never run into any issue. Did you validate the HW functionality with non-secure silicon before you populated secure parts on the device. Does the issue not occur when GP (general purpose/non-secure) silicon sample is used?  Are all your 4 boards behaving in the same manner. 

    The LPSC issue seems to occur from PSC_ALL_on function in the GEL file where the very first LPSC corresponding to EDMA CC is not being turned on during the initialization process. This LPSC has no dependency other than clocks and voltage rails on the device. From a debug perspective, we also provide a debug GEL file that reads the system state but this could also run into issue if the chip is not being clocked/powered up correctly but you could give this a try:

    C674x_debug.gel

    Another thing that you can try with this since the chip is booting from secure ROM is to try and do the PSC init from INI file. Looks like you are already enabling module corresponding to LPSC 6 in the file using the following syntax in the file:

    ; This section should be used to setup the power state of modules
    ; of the two PSCs. This section can be included multiple times to
    ; allow the configuration of any or all of the device modules.
    ; |------24|------16|-------8|-------0|
    ; LPSCCFG: | PSCNUM | MODULE | PD | STATE |
    [PSCCONFIG]
    LPSCCFG = 0x01060003

    Regards,

    Rahul

    PS: It is generally recommended that you check out the board functionality with non-secure silicon before populating secure silicon so I would still recommend doing full diagnostic on the HW before proceeding with further development.

  • Bilal,

    Sorry for the delay in getting to this thread. 

    You seem to be trying this on custom platform so this could be a clocking or a voltage rail issue rather than to do with secure silicon. We have used that same INI file on multiple TI EVMS and LCDK platforms and never run into any issue. Did you validate the HW functionality with non-secure silicon before you populated secure parts on the device. Does the issue not occur when GP (general purpose/non-secure) silicon sample is used?  Are all your 4 boards behaving in the same manner. 

    The LPSC issue seems to occur from PSC_ALL_on function in the GEL file where the very first LPSC corresponding to EDMA CC is not being turned on during the initialization process. This LPSC has no dependency other than clocks and voltage rails on the device. From a debug perspective, we also provide a debug GEL file that reads the system state but this could also run into issue if the chip is not being clocked/powered up correctly but you could give this a try:

    1586.C674x_debug.gel

    Another thing that you can try with this since the chip is booting from secure ROM is to try and do the PSC init from INI file. Looks like you are already enabling module corresponding to LPSC 6 in the file using the following syntax in the file:

    ; This section should be used to setup the power state of modules
    ; of the two PSCs. This section can be included multiple times to
    ; allow the configuration of any or all of the device modules.
    ; |------24|------16|-------8|-------0|
    ; LPSCCFG: | PSCNUM | MODULE | PD | STATE |
    [PSCCONFIG]
    LPSCCFG = 0x01060003

    Regards,

    Rahul

    PS: It is generally recommended that you check out the board functionality with non-secure silicon before populating secure silicon so I would still recommend doing full diagnostic on the HW before proceeding with further development.

  • Hi Rahul,

    Hope you are fine.We dont have any nonsecure board.We ordered non secure boards but accidently we get secure boards .So all 4 boards are secured .Secondly i checked the hardware i.e clock oscillator is generating exact 24MHZ and check the power sequence voltages(1.3V,1.8Vand 3,3V all are ok).

    Regards,

    Bilal

  • Hi Rahul,

    Please find the attached pictures.Figure 1 is showing oscillator which is generating 24MHZ.Figure 2 is showing that 1.3V power is first on then 1.8V power is on and lastly figure shows that 1.3V power is first on then 3.3V  power is on.

    Figure 1:

    Figure 2:

    Figure 3:

    Oscilloscope is showing some fluctuation in voltages due to probes but i will check it by DMM.I am getting exact 1.3V,1.8V and 3.3V on the test points.Rahul I will out from office now but I will checked the debug gel file tommorrow and the remaining guidance by you.

    Regards,

    Bilal 

  • Hi Rahul,

    Please find the attached log file for 1586.C674x_debug.gel.

    C674X_0: Error connecting to the target: (Error -6311) PRSC module failed to write to a register. (Emulation package 8.1.0.00007)
    C674X_0: GEL Output:
    ---------------------------------------------
    C674X_0: GEL Output: | Device Information |
    C674X_0: GEL Output: ---------------------------------------------
    Run_All() cannot be evaluated.
    Could not read 0x01C14018: target is not connected
    at GEL_TextOut("DEV_INFO_00 = %x\n", 0, 0, 0, 0, *((unsigned int *) (0x01C14000+0x018))) [1586.C674x_debug.gel:300]
    at Print_Device_Info() [1586.C674x_debug.gel:64]
    at Run_All()

    Regards,

    Bilal.

  • Hi Rahul,

    Please answer my queries.

    1:Is there any secure TI evaluation kit available for secure devices?

    2:Is there any HW modifiaction required for secure devices?

    Because our custom board design is same like LCDK or EVM.We need any kind of HW modification in secure device?

    Regards,

    Bilal.

  • Bilal,

    I discussed this issue internally and we think the best course of action would be for you to replace the secure parts with non-secure devices as required in your end product. The secure silicon boots differently and is not suited for board bring up and debug so you shouldn`t be dealing with this additional complexity unless it is required in your end product. 

    I understand that you have validated the clock and voltage rails but we need to ensure that the security portion of the chip is not playing any role in the issues that you are seeing in the custom board design. Please let us know if you are having any issues ordering or getting the secure parts replaced and we we can reach out to our local teams to help you in obtaining the non-secure parts to proceed with this debug.

    Regards,

    Rahul

  • Hi  Rahul,

    Hope you are fine.You didn't answer my queries as mentioned below:

    Please answer my queries.

    1:Is there any secure TI evaluation kit available for secure devices?

    2:Is there any HW modification required for secure devices?

    Because our custom board design is same like LCDK or EVM.We need any kind of HW modification in secure device?

    3: My Project Manager wants to know the exact reason for not using E secure Chip in our custom design.If we want to use this same  E secure chip in our final product in the near future so how can we use it?

    Please answer my Queries 

    Thanks and Best Regards,

    Bilal Zahoor Ahmed.

    Regards,

    Bilal.

  • Bilal said:
    1:Is there any secure TI evaluation kit available for secure devices?

    Secure OMAPL138 was supported using Logic PD EVM and secure SOM. That HW platform is now End of Life so we are using internally modified LCDK platforms for support but these are not customer order able so there isn`t one for customers to use for development.

    Bilal said:
    2:Is there any HW modification required for secure devices?

    No, there is no HW modification that I am aware of. The secure version of the device is drop in replacement for non-secure device however the secure device runs through a secure ROM data path and has firewalls for memory and JTAG during power up sequence and also needs the images to be signed and/or encrypted to boot on the device.

    Bilal said:
    3: My Project Manager wants to know the exact reason for not using E secure Chip in our custom design.If we want to use this same  E secure chip in our final product in the near future so how can we use it?

    you can use a secure chip for your end product if security and encrypted boot is a product requirement however the recommended development flow for these parts is to develop and prototype and do HW functional testing using non-secure devices and then build with secure parts when you are ready for non-debug based secure boot.deployment of your product so in either case, you need HW functional validation with non-secure silicon to be able to debug HW issues through JTAG debug capability.

    Hope this helps.

    Regards,

    Rahul