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.

DM6446:HELP SPECTRUM DIGITAL CODE VLYNQ

Hello everyone

I want to enable the VLYNQ interface on DM6446.Have read sprue36.pdf on VLYNQ interface.I have downloaded the CCS code of the VLYNQ from spectrum digital site it is a loop back

test have connected all the TX and RX pins now when i load the code and run it the LINK gets connected with only one pin Also i can see the clock of the VLYNQ on the scope but i am

unable to verify the Recieve and Transmitted data. Sprue36.pdf says that the width is auto dectected.I have conneted all the pins and but only one pin gets detected anyone who has

checked or verified this code.

 

 

Regard's

Rohan Tabish

  • Rohan,

    I am afraid VLYNQ is one of those though peripherals to support as we do not provide any Linux drivers for it; we have had a couple of customers take the Spectrum Digital code and use it as a basis for successfully writing their own driver using the VLYNQ User Guide.  Unfortunately, they have not shared their code, but they were very pleased with the simplicity of the way it worked.  That said, if you have any specific questions as to how the hardware works, or what effect does a particular register have, I would be happy to help look into this for you.

     

  • Hi Rohan,

    Some questions -

    1. What do you mean by saying, only one pin is getting detected - only Tx pin or only Rx pin?

    2. Where did you check the connectivity? - on the OScilloscope?

    3. Also, how are you checking whether the data has been sent correctly? - are you monitoring the corresponding register memory of DM6446 in CCS? If data is getting sent, then on loopback you should be seeing updated data in the corresponding registers.

    Hope, I can help further after getting above answers.

    Regards,

    Sid

  • Thanks Juan and Sid for you reply.

    Actually i want to write a Linux Driver I havn't Found anyone except the CCS version.I know how to convert to the Linux driver.

    Well  Sid here is the answer to your questions

    1. What do you mean by saying, only one pin is getting detected - only Tx pin or only Rx pin?

    Configuration the code pins does not matters since the VLYNQ automatically detects the number of the pins that are connected. I have loopback all the PINS but when the LINK gets established which can be checked by the LINK bit in the STATUS register only one pin gets detected. And I mean that one TX pin is connected to one RX pin.

    2. Where did you check the connectivity? - on the OScilloscope?

    The connectivity can be checked by seeing the activity at these pins using Oscilloscope.

    3. Also, how are you checking whether the data has been sent correctly? - are you monitoring the corresponding register memory of DM6446 in CCS? If data is getting sent, then on loopback you should be seeing updated data in the corresponding registers.

     

    Here is the Code From Spectrum Digital that Tests the Loopback
        Int16 i;
        Int16 errors = 0;

        Int16 pins_used;
        Int16 scrun_used;

        /* TX */
        Uint32* ptx;
        Uint32 tx_memory_offset;
        Uint32 tx_memory_length = tx_length * 4;

        /* RX */
        Uint32 rx_memory_offset = ( Uint32 )℞
        Uint32 rx_memory_length = rx_length * 4;

        /* ---------------------------------------------------------------- *
         *  Setup VLYNQ Module                                              *
         * ---------------------------------------------------------------- */
        pins_used  = VLYNQ_USE_4_PINS;
        scrun_used = VLYNQ_DONT_USE_SCRUN;
        errors = vlynq_init( pins_used, scrun_used );

        if ( errors )
            return -1;

        /* ----------------------------------------------------------------*
         *  Setup VLYNQ Memory Map                       *
         *        Store at end of range                           *
         * ----------------------------------------------------------------*/
        tx_memory_offset    = VLYNQ_REMOTE_BASE + VLYNQ_REMOTE_LEN - tx_memory_length;
        VLYNQ_XAM           = tx_memory_offset;
        VLYNQ_RAMO1         = rx_memory_offset;
        VLYNQ_RAMS1         = rx_memory_length;

        /* Init tx pointers */
        ptx = ( Uint32* )( VLYNQ_XAM );

        /* Setup buffers */
        for ( i = 0 ; i < tx_length ; i++ )
        {
            tx[i] = ( i << 16 ) | ( Uint16 )( ~i );
            rx[i] = 0;
        }

        /* Wait for VLYNQ link */
        if ( vlynq_wait_for_link( vlynq_timeout ) == VLYNQ_NO_LINK_FOUND )
        {
            vlynq_quit( );
            return -2;
        }

        /* Make sure we are using all the pins */
        if ( vlynq_tx_pins_used( ) != pins_used )
            errors += 1000;
        if ( vlynq_rx_pins_used( ) != pins_used )
            errors += 1000;

        /* ----------------------------------------------------------------*
         *        Loopback test                                     *
         *        Send and Recv to self                          *
         * ----------------------------------------------------------------*/

        /* Write Data to VLYNQ memory */
        for ( i = 0 ; i < tx_length ; i++ )
            *ptx++ = tx[i];

        _waitmsec( 1000 );

        /* Verify data */
        for ( i = 0 ; i < rx_length ; i++ )
            if ( rx[i] != tx[i] )
                errors++;

        if ( errors )
            printf( "Error code %d\n", errors );

        vlynq_quit( );
        return errors;

    Moreover I cannot do debug since VLYNQ does not support emulation/halts/suspend operation as mentioned in SPRUE36.pdf

    Regard's

    Rohan Tabish


     

  • the pins are getting detected now but the data verification fails.

     

    Regard's

    RT