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.

Hyperlink package driver loopback example

Hi everyone,

I am trying implement loopback example of hyprlnk driver on Keystone device for understanding workflow.

I understood from codes that If I use loopback feature, I needn't two devices and I can do loopback with one devices and that feature is opened as default.

I changed only hyplnkExampleDataBuffer_t structer for using as hyplnkExampleBlockBuffer_t cpuBlock based on Asynchronous block transfers using CPU (memset/memcmp), Because the synchronized token exchange requires the same SW on each endpoint but I have one device.

But, when  in   hyplnk_LOCATION_REMOTE  part of hyplnkExampleCheckOneStat function , the Hyplnk_readRegs function corrupt and I cant connect to dsp with emulator.

May I consider something wrong regarding single or two devices ? Because I think driver waits response from other device even if I use loopback feature?

Thanks

  • Hi odc,

    Single DSP device is enough for hyperlink loopback testing.

    If you want to run hyperlink example on loopback mode means you need to uncommand the following definition in default MCSDK hyperlink example code("hyplnkLLDCfg.h" file).

    "#define hyplnk_EXAMPLE_LOOPBACK"

    Thanks,

  • I have attached hyperlink loopback log message and modified "hyplnkLLDCfg.h" file for your reference.

    [C66xx_0] Version #: 0x01000105; string HYPLNK LLD Revision: 01.00.01.05:Nov 19 2012:16:04:15
    About to do system setup (PLL, PSC, and DDR)
    Power domain is already enabled.  You probably re-ran without device reset (which is OK)
    Constructed SERDES configs: PLL=0x00000228; RX=0x0046c485; TX=0x000cc305
    system setup worked
    About to set up HyperLink Peripheral
    ============== begin registers before initialization ===========
    Revision register contents:
      Raw    = 0x4e901900
    Status register contents:
      Raw        = 0x00002004
    Link status register contents:
      Raw       = 0x00000000
    Control register contents:
      Raw             = 0x00000001
    Control register contents:
      Raw        = 0x00000000
    ============== end registers before initialization ===========
    SERDES_STS (32 bits) contents: 0x00000001; lock = 1
    ============== begin registers after initialization ===========
    Status register contents:
      Raw        = 0x04400005
    Link status register contents:
      Raw       = 0xccf00cf0
    Control register contents:
      Raw             = 0x00006202
    ============== end registers after initialization ===========
    Waiting 5 seconds to check link stability
    Precursors 0 Analysis: 1,0,1,0,1,0,1,0
    Postcursors: 19 Analysis: 1,0,1,0,1,0,1,0
    Link seems stable
    About to try to read remote registers
    ============== begin REMOTE registers after initialization ===========
    Status register contents:
      Raw        = 0x0440080f
    Link status register contents:
      Raw       = 0xfdf0bdf0
    Control register contents:
      Raw             = 0x00006202
    ============== end REMOTE registers after initialization ===========
    Peripheral setup worked
    About to read/write once
    Single write test passed
    About to pass 65536 tokens; iteration = 0
    === this is not an optimized example ===
    Link Speed is 4 * 6.25 Gbps
    Passed 65536 tokens round trip (read+write through hyplnk) in 16220 Mcycles
    Approximately 247508 cycles per round-trip
    === this is not an optimized example ===
    Checking statistics
    About to pass 65536 tokens; iteration = 1

    7416.hyplnkLLDCfg.h

    Thanks,

  • Thanks

    Are there any change in hyplnkExample.c  ? 

  • No.

    Uncommand the following definition in hyplnkLLDCfg.h" file is enough for loopback mode testing

    "#define hyplnk_EXAMPLE_LOOPBACK"

    Thanks,