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.

How to configure DSP/BIOS when implementing RTDX write operation in C5510 DSK

Other Parts Discussed in Thread: CCSTUDIO

                          In CCStudio_v3.1\examples\dsk5510\rtdx\\t_write, it can send data from target DSP to host client Matlab using the following program. It does not use DSP/BIOS configuration, but writing DSK5510.cmd and intvecs.asm.

 

unsigned int i;

        /* Target initialization for RTDX                           */
        TARGET_INITIALIZE();

        /* Enable the output channel, "ochan"                       */ 
        RTDX_enableOutput(&ochan);

        for ( i = 0; i < 100; i++ ) {
                /* Send the data to the host                        */
                if ( !RTDX_write( &ochan, &i, sizeof(i) ) ) {
                        fprintf(stderr,
                                "\nError: RTDX_write() failed!\n");
                        abort();
                }

                /* Wait for data transfer                           */
                while ( RTDX_writing != NULL ) {
                        #if RTDX_POLLING_IMPLEMENTATION
                                /* Call Poll to do data transfer    */
                                RTDX_Poll();
                        #endif
                }
        }

              I want to send ADC results from DSP to host client using above RTDX write problem. But I need timer0 interrupt program to deal with the control of sampling, so I add the sampling program in the timer interrupt example program ----CCStudio_v3.1\examples\evm5510\csl\timer\timer1_useBios,   which uses DSP/BIOS configuration.  I add above RTDX write program(here I do not use the real time sampling result, only given numbers as above program ), There is not compile and build error, but the data can't be sent to host client Matlab .

              I want to know how to reconfigure this  DSP/BIOS configuration, e.g., memory allocation, RTDX interrupt mask, ........, so I can still use the above RTDX write program to send the data from DSP to host???
            

 

 

  • Shanjie, 

    I think you need to get help from DSP/BIOS experts. Let me move your post to DSP/BIOS forum.

    Thanks,

    Peter 

     

     

  • Thank you very much.

               I look forward to the help from this forum.

  • Hi,

    I have successfully used RTDX to write directly to a host from my DSP target using RTDX_write() after configuring DSP/BIOS to use RTDX. Basically I am already using the DSP/BIOS config tool for other reasons so to configure RTDX was reasonably easy.

    On a 5505 chip you will need to go into DSP/BIOS config to activate RTDX. then you will need to successfully compile your code, then activate an RTDX chanel to use your JTAG interface to communicate to the host PC. I also specified the file name to write to on the host. In the code itself, before you do an RTDX_write(&ochan, &i, sizeof(i)); command, I think I did another command just before to open the channel - such as RTDX_enableOutput(&ochan);. When you are finished you may need to close the channel (I never did because I always had a break-point to halt the program before I recommenced from the start).

    If all works you will need to open the file that you wrote to with a binary viewer and read your data. I noticed there are some bytes (or delimiters or something) that are added by the RTDX_write() into the file which does not correspond to my data (which I know what it looks like), but it repeats in blocks which corresponds to my output buffer size. I do a write of an array of 246 words every 20ms, but in your case you're writing an int "i" which increments. I dod not know what the extra header/delimiter is and what the format is as it's not writen in any documentation on RTDX (This however I would like to know)

    Also, for the 5505 devices the RTDX is interrupt driven, but for the 5510 I do not know if it is poll or interrupt driven, so you may need to verify that. Also I did not verify if the write was successful within the code, but it seemed to be so judging by the output binary data ...

    Hope this helps,

    Mike