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.

TDA2x : DSP (C66x1) core is hanging

Hallo,

I am trying to port video processing algorithm on DSP core (C66x1). But when i run the algorithm, after initialization the DSP core hangs and i get the following information (boldface) on console:

[Cortex_M4_IPU1_C0] POLLED Mode is Selected
 IPU1-0 Remote Log Shared Memory @ 0xa0d00000
 IPU1-1 Remote Log Shared Memory @ 0xa0d04010
 HOST Remote Log Shared Memory @ 0xa0d08020
 DSP1 Remote Log Shared Memory @ 0xa0d0c030
 DSP2 Remote Log Shared Memory @ 0xa0d10040
 EVE1 Remote Log Shared Memory @ 0xa0d14050
 EVE2 Remote Log Shared Memory @ 0xa0d18060
 EVE3 Remote Log Shared Memory @ 0xa0d1c070
 EVE4 Remote Log Shared Memory @ 0xa0d20080
*** VPDMA Firmware Loading... ***
[Cortex_M4_IPU1_C1]
[Cortex_M4_IPU1_C0] VPDMA Firmware Address = 0xa0e08000
[Cortex_M4_IPU1_C1] MAC Port 0 Address:
[Cortex_M4_IPU1_C0] VPDMA Load Address     = 0x4897d004
[Cortex_M4_IPU1_C1]     c4-ed-ba-be-b2-de
[Cortex_M4_IPU1_C0] VPDMA Firmware Version = 0x4d0001b8
[Cortex_M4_IPU1_C1]
[Cortex_M4_IPU1_C0] VPDMA List Busy Status = 0x00000000
[Cortex_M4_IPU1_C1] MAC Port 1 Address:
[Cortex_M4_IPU1_C0] *** VPDMA Firmware Load Success ***
[Cortex_M4_IPU1_C1]     c4-ed-ba-be-b2-df
[Cortex_M4_IPU1_C0]
[Cortex_M4_IPU1_C1] Service Status: DHCPC    : Enabled  :          : 000
[Cortex_M4_IPU1_C0] *** VPDMA Firmware Loading... ***
[Cortex_M4_IPU1_C1] Service Status: Telnet   : Enabled  :          : 000
[Cortex_M4_IPU1_C0] VPDMA Firmware Address = 0xa0e08000
[Cortex_M4_IPU1_C1] Service Status: DHCPC    : Enabled  : Running  : 000
[Cortex_M4_IPU1_C0] VPDMA Load Address     = 0x4899d004
VPDMA Firmware Version = 0x4d0001b8
VPDMA List Busy Status = 0x00000000
*** VPDMA Firmware Load Success ***

*** VPDMA Firmware Loading... ***
VPDMA Firmware Address = 0xa0e08000
VPDMA Load Address     = 0x489bd004
VPDMA Firmware Version = 0x4d0001b8
VPDMA List Busy Status = 0x00000000
*** VPDMA Firmware Load Success ***

*** VPDMA Firmware Loading... ***
VPDMA Firmware Address = 0xa0e08000
VPDMA Load Address     = 0x489dd004
VPDMA Firmware Version = 0x4d0001b8
VPDMA List Busy Status = 0x00000000
*** VPDMA Firmware Load Success ***

 EEPROM Base Board Name: [5777xCPU]
[C66xx_DSP1] A0=0x3ff08a74 A1=0x80000000
A2=0x0 A3=0x1
A4=0xb0 A5=0x0
A6=0x1 A7=0x0
A8=0xffffff81 A9=0xffffff81
A10=0x0 A11=0x40009a80
A12=0x9410d78c A13=0x1
A14=0x96596f84 A15=0x96596f84
A16=0x1 A17=0x0
A18=0x80000000 A19=0x0
A20=0x0 A21=0x0
A22=0x3a3b21f7 A23=0x5a
A24=0x1 A25=0x0
A26=0x1 A27=0x0
A28=0x400 A29=0x800b1fef
A30=0x3b300000 A31=0x0
B0=0x1 B1=0x0
B2=0x0 B3=0x96054670
B4=0x0 B5=0x0
B6=0x1 B7=0x80000000
B8=0x1 B9=0xfffffffd
B10=0x4ab B11=0x248973c
B12=0xffffffff B13=0x2
B14=0x96695a24 B15=0x96596ab0
B16=0xd348b900 B17=0x1
B18=0x0 B19=0x80
B20=0xe3eea020 B21=0xc14dd18d
B22=0xf B23=0x0
B24=0xaae04084 B25=0x7041069e
B26=0x83b34105 B27=0x0
B28=0x96264644 B29=0x962645d4
B30=0x2e0 B31=0x1
NTSR=0x1020d
ITSR=0x20d
IRP=0x1
SSR=0x0
AMR=0x0
RILC=0x0
ILC=0x0
Exception at 0x0
EFR=0x2 NRP=0x0
Internal exception: IERR=0x1
Instruction fetch exception


I am porting this algorithm from C64, so in principle it should not hang. I have no idea why its hanging, i can not even debug it.

Can you please let me know if i need to know anything important.

Thanks in advance.

Anshul

 

  • Anshul

    Are you trying standlone C6x algorithm test or integarted the same with Visison SDK?

    Do you have CCS and J-Tag, if you have J-tag then its easy to debug the DSP side code.

    regards, shiju

     

     

  • My response:

    I have integrated it in Vision SDK 2.2. I have added the algorithm to following place in Vision SDK

    C:\VISION_SDK_02_02_00_00\vision_sdk\examples\tda2xx\src\alg_plugins

    I am using M4 -DSP1-M4 without EDMA3.

    I am using CCS 5.5 and JTAG XDS560v2.

    Regards,

    Anshul

     

    Shiju Sivasankaran said:

    Anshul

    Are you trying standlone C6x algorithm test or integarted the same with Visison SDK?

    Do you have CCS and J-Tag, if you have J-tag then its easy to debug the DSP side code.

    regards, shiju

     

     

  • Anshul

    Good that you have CCS and J-TAg.

    I have noticed one issue with CCS 5.5 where the DSP is getting reseted if connect the CCS.

    So can you try debugging with CCS5.4 version.

    Build the debug profile version of binaries to debug as it will have all the symbol infos avaiable. Modify Rules.make to change to debug profile build option

    Basically put a breakpoint in your Algxxx_create() function and try single step from there

    regards, shiju

     

     

  • Hi shiju,

    I am doing exactly what you suggested but in CCS 5.5 . 

    I will try with CCS 5.4.

    Thanks

     

    Shiju Sivasankaran said:

    Anshul

    Good that you have CCS and J-TAg.

    I have noticed one issue with CCS 5.5 where the DSP is getting reseted if connect the CCS.

    So can you try debugging with CCS5.4 version.

    Build the debug profile version of binaries to debug as it will have all the symbol infos avaiable. Modify Rules.make to change to debug profile build option

    Basically put a breakpoint in your Algxxx_create() function and try single step from there

    regards, shiju

     

     

  • Dear Shiju,

    I have another problem. While loading the binaries most of the time I get the following error:

    js:> loadJSFile C:/VISION_SDK_02_02_00_00/vision_sdk/build/scripts/launch_visionsdk.js

    Could not open session. Found 2 devices matching: Spectrum Digital XDS560V2 STM USB Emulator_0/ARP32_EVE_3

    Spectrum Digital XDS560V2 STM USB Emulator_0/ARP32_EVE_3

    Spectrum Digital XDS560V2 STM USB Emulator_0/ARP32_EVE_3 (C:\VISION_SDK_02_02_00_00\vision_sdk\build\scripts\launch_visionsdk.js#87)

    It also happens sometimes with EVE_2 or EVE_4 

    Regards,

    Anshul

  • Dear Shiju,

    I have another problem. While loading the binaries most of the time I get the following error:

    js:> loadJSFile C:/VISION_SDK_02_02_00_00/vision_sdk/build/scripts/launch_visionsdk.js

    Could not open session. Found 2 devices matching: Spectrum Digital XDS560V2 STM USB Emulator_0/ARP32_EVE_3

    Spectrum Digital XDS560V2 STM USB Emulator_0/ARP32_EVE_3

    Spectrum Digital XDS560V2 STM USB Emulator_0/ARP32_EVE_3

    (C:\VISION_SDK_02_02_00_00\vision_sdk\build\scripts\launch_visionsdk.js#87)

    It also happens sometimes with EVE_2 or EVE_4. Can you please tell me why its occurring. I am getting this issue very often and resetting/restarting doesn't help.

    Regards,

    Anshul

  • Hello Anshul,

    I assume that the DSP hangs, because of MMU is disabled.

    Could you enable DSP_MMU modules and try again your test?

    For this purpose you must apply some changes in DSP registers:

    DSP C66x CPU traffic initiated on the DSP MDMA port can be optionally routed through the DSP_MMU
    DSP_SYS_MMU_CONFIG [0] MMU0_EN bit - 0x1: ENABLED = MMU is enabled.

    MMU enable control in a dedicated DSP_MMU0 memory mapped register. It is used to enable the MMU functionality after the page tables are programmed for MMU operation. MMU_CNTL[1] MMUENABLE - 0x1 MMU enabled

    In addition, the DSP_MMU0 traffic can be aborted in case of a lockup via the DSP_SYS_MMU_CONFIG [8] MMU0_ABORT bit. In other words, this bit can be used to clear a hang condition that may occur if the DSP_MMU0 encounters a page fault that cannot be serviced.

    Only for you information: - Do you use following commands by running DSP application:

    Running DSP sample applications

    DCE framework running on DSP1 supports C66x codecs with VIDDEC2 interface. In the current version of dspdce package, Universal_copy algorithm (with IUNIVERSAL interface) is invoked from dce VIDDEC2 interfaces. Universal_copy algorithm does simple input buffer to outbuffer memcopy. To integrate C66x codecs with VIDDEC2 interface, iuniversal interfaces needs to be replaced with ividdec2 interfaces in DCE framework.

    The following are the applications that one could run from A15 to exercise the above on DSP:

    copycodectest: This application is to test Universal_copy with VIDDEC2 interface. This application fills the input buffer with a number entered as argument and after process output buffer is tested for same pattern.

    usage: copycodectest pattern.

    Example:
      target # copycodectest 123

    yuvcopytest: This applciation reads one frame of yuv of known width and height into input buffer. Luma output buffer after process call is sent to display to check if universal_copy running on DSP is properly copied to output buffer.
    usage: yuvcopytest -s <connector_Id>:<mode> yuvfile -w width -h height

    Example:
      target # yuvcopytest -s 4:800x480 input.yuv -w 1920 -h 1080

    For more information see in ti-glsdk_dra7xx-evm_6_04_00_02/docs/DRA7xx_GLSDK_Software_Developers_Guide.html#Running_DSP_sample_applications

    Best regards,

    Yanko

  • Dear Yanko,

    Is it relevant for TDA2x chip ? Because I did not find this DSP_SYS_MMU_CONFIG [0] MMU0_EN bit

    in VisionSDK 2.2.

    Regards,

    Anshul

  • Anshul

    In vision SDK, we are not doing any MMU configuration for DSP.

    Please make sure you done the "check for update" - for Emmulation update.

    Also use the correct CSP version mentioned in the release (user guide)

    Another option is to use the SBL (SD card) boot option instead of CCS boot.

    later you can connect CCS & load syambols to continue with the your debug

    regards, shiju