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.

TMS320F28386D: Questions about parallel data processing

Part Number: TMS320F28386D
Other Parts Discussed in Thread: C2000WARE, SYSCONFIG

Hello.

I would like to ask you a question about how to convert data input in parallel into series.

The figure above is the data output waveform of AFE5401(TI ADC).

As shown in the figure, signals are being output in parallel from D0 to D11 pins.

And I would like to show it as a serial signal like CH1 ~ CH4.

The SYSCLK of tms320f28386d is 200 MHz, and the DCLK output from ADC (AFE5401) is 1.5625 MHz.

Ultimately, what I want to know is whether it can be implemented as a program without an external shift register.

Is it possible to implement it with GPIO? If you tell me various ways to implement it, I will try it. I would appreciate it if you could also suggest an example.

I desperately hope that I can get help.

Thank you.

  • Hi Son,

    To implement this efficiently using GPIOs, there would have to be about 13 GPIOs that are available on the F28386D.  12 of which should belong to the same port.  Ports are in steps of 32 such that Port A is from GPIO0-31.  Port B is from GPIO32-63...etc..  Reason for this is that it is more efficient to read GPIO data value for several channels with a port read.  The 12 channels will be for the data pins, preferably in a contiguous sequence of GPIO#s as the data pins D0-D11 so that data manipulation would be quicker just by doing bit shifts/masks on the port read results.  The last channel would be for DCLK and it can be assigned to any port.

    All 13 GPIO channels will be configured as inputs on the F28386D.  Assign the DCLK channel to trigger an external interrupt on rising edge of the DCLK.  See C2000Ware example gpio_ex3_interupt.  Modify the test case such that in the interrupt handler (gpioInterruptHandler in the example), add function GPIO_readPortData() to read the port output, then perform shift/mask operations on the result and move this to memory for post processing at a later time for the ADC results.  You would need to configure the data channels for D pins as inputs in the code as well.

    Hopefully this method will work for you.

    Regards,

    Joseph

  • Thank you for your detailed explanation! I got a sense of what to do.

    Lastly, I would like to ask you a few questions.

    1. As you explained, I am receiving values through 12 pins in the GPIO C port. And I checked that the value was constantly being read.

    It may be a silly question, Assuming that the period of the signal output from the ADC is 6.25 MHz, can I be sure that I'm reading the value every period of 6.25 MHz?

    2. I want to transfer the values I read in cpu1 to cpu2 and store them in the array. May I know where the relevant examples are?

    Thank you again for your detailed response.

  • The GPIOs are capable in generating toggles and detecting levels at that speed, but if you are in doubt, you can add another GPIO for debug purposes only to toggle at the beginning of the interrupt handler and toggle back at the end of the handler, then observe the toggles in the scope.  The toggling speed should be the same as the DCLK from the other chip.

    There are several options for the data transfer:

    1.) You could run all the GPIO reads and external interrupts on CPU2 but you have to configure the GPIOs in CPU1 (see led_blinky example under c28x_dual).  This frees up the ADC read task from CPU1.

    2.) You can use IPC (interprocessor communication) to pass data from CPU1 to CPU2 through message RAMs.  See examples under c28x_dual/ipc. 

    3.) You can also use DMA but ensure that the data processed from the GPIO is stored in GS ram so both CPUs will have access.  The first example is using SPI but it demonstrates the concept of triggering DMA between CPUs.  You can try the sysconfig examples as well

    Regards,

    Joseph.

  • I'm grateful for your support. I'll try as you explained, and if I have any other questions, I'll write a new thread.

    I hope you have a great day. Thank you.