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.

problem when sending data from target to host USE RTDX

hj. I have a project with DSP C6416 is "Sending some bytes from target to host"

 

in Application of Targer (CCS), I use the structure following:

TARGET_INITIALIZE();

void funSWI()
{
  /* data to send to host */
    int status;
    int j;
    int size1;
    int size2;

    /* enable the output channel */
    RTDX_enableOutput( &ochan );

    /* send the data to the host */
    status = RTDX_write( &ochan, &size1, sizeof(size1) );
    status = RTDX_write( &ochan, &size2, sizeof(size2) );
  
    /* check the status of the write operation */
    if ( status == 0 ) {
        puts("ERROR: RTDX_write failed!\n" );
        exit(-1 );
    }
    /* disable the channel after use */
    RTDX_disableOutput( &ochan );
}

-----------------------------------------------------------------------------------------

And in application of Host (VB6.0) , I use the structure following:

 

Dim rtdx As Object

Dim size1 As integer

Dim size2 As integer

-----------------OutputChannel is opened first--------------------------------------------

Set rtdx = CreateObject("RTDX")

status = rtdx.Open("ochan", "R")

---------------------------------------------------

 

------------when CCS is being run ,  these following Function start to run---------------------------------------------

status = rtdx.ReadI2(size1)

status = rtdx.ReadI2(size1)

------------------------------------------------

status = rtdx.Close()
Set rtdx = Nothing

--------------------------------------------------------------------------------------------

When I debug in ccs, function RTDX _write() work very good, status = 1

But size1 & size2 in VB is allway =0

 

Tell me what is wrong??

Anyone help me!!!!!

Thank you very much!

  • It's been a long time since I've done anything with RTDX, but the first thing I would suggest is checking to see if the interrupts are configured correctly for RTDX.  If they are not, the RTDX_write on the target should pass, and write the value to the RTDX buffer.  But if the RTDX interrupt is not serviced, the value will never be passed to the host.

     

    There's an old application note that describes a bit of this. I found one instance at http://www.rose-hulman.edu/class/ee/yoder/ece581/Labs/Lab05/spra895.pdf

     

    Regards,
    Dan

     

  • danr said:

    It's been a long time since I've done anything with RTDX, but the first thing I would suggest is checking to see if the interrupts are configured correctly for RTDX.  If they are not, the RTDX_write on the target should pass, and write the value to the RTDX buffer.  But if the RTDX interrupt is not serviced, the value will never be passed to the host.

     

    There's an old application note that describes a bit of this. I found one instance at http://www.rose-hulman.edu/class/ee/yoder/ece581/Labs/Lab05/spra895.pdf

     

    Regards,
    Dan

     

     

    Thank you ^^

    I think my problem is Interrupt

    When I place SentToHost() Function in Main() , my example data is send successful

    But When I place it in PingPong() using EDMA,  the Proccess is always stopped in "     while (RTDX_writing != null)    "

    :((

    How me could configure interrupt for RTDX?

    Thanks Dan very much!!

     

  • Check the application note that I pointed you to.  Specifically, see...

     

    For TMS320C6000 applications, the interrupt vector MSGINT (offset 060h) must be defined to
    point to the RTDX interrupt handler RTEMU_msg, which is a special interrupt entry to save and
    restore context around the RTDX_Poll function. The implementation of RTDX for C6000 is
    interrupt-driven and there is roughly one interrupt from the host for each word of transfer. This
    interrupt is reserved for use with real-time monitor interrupts. An example of how this vector
    should be defined can be found in the file intvecs.asm. This file can be found in the directory
    \ti\examples\<target>\rtdx\shared, where “<target>” is dsk6211 for the C6211 DSK, dsk6711 for
    the C6711 DSK and evm6201 for the C6201 EVM.

    I _think_ the steps should be similar for the 64x+ if that's the device that you're using.

     

    Regards,

    Dan