DSPRelated.com
Forums

Switching speed og GPIO

Started by alberthcsiu July 7, 2008
Hi All,

I am using the DSK6455 which includes two MCBSP port and these two
MCBSP port of 6455 can be use as a SPI interface. In my system I use
both MCBSP port to interface with ADC/DAC so there is no free MCBSP port.

As I need another port to interface with a MCU which require a data
rate at about 30Mb/s, so I decided to use the SPI interface. Since
there is no free MCBSP port in my system, I use the GPIO to implement
the SPI myself. After the implementation, I find that the clock speed
of this GPIO type SPI interface is around 5Mb/s. My problem is as below:

1. Is there any better solution that I can use to link the MCU and DSP
together with a data rate of ~30Mb/s.
2. Do anyone have try this GPIO type SPI interface approach and have
figure on the maximum data rate about it?

Thanks in advance.

Albert Siu
Albert,

On Sun, Jul 6, 2008 at 9:11 PM, alberthcsiu wrote:
> Hi All,
>
> I am using the DSK6455 which includes two MCBSP port and these two
> MCBSP port of 6455 can be use as a SPI interface. In my system I use
> both MCBSP port to interface with ADC/DAC so there is no free MCBSP port.


I think that you are confused by the docs. Check the schematic and tech ref -
1. McBSP0 goes straight to the daughtercard.
2. McBSP1 is used for data [optionally switched to daughtercard] and
I2C is used for control/setup.

mikedunn
>
> As I need another port to interface with a MCU which require a data
> rate at about 30Mb/s, so I decided to use the SPI interface. Since
> there is no free MCBSP port in my system, I use the GPIO to implement
> the SPI myself. After the implementation, I find that the clock speed
> of this GPIO type SPI interface is around 5Mb/s. My problem is as below:
>
> 1. Is there any better solution that I can use to link the MCU and DSP
> together with a data rate of ~30Mb/s.
> 2. Do anyone have try this GPIO type SPI interface approach and have
> figure on the maximum data rate about it?
>
> Thanks in advance.
>
> Albert Siu

--
www.dsprelated.com/blogs-1/nf/Mike_Dunn.php
Albert-

> I am using the DSK6455 which includes two MCBSP port and these two
> MCBSP port of 6455 can be use as a SPI interface. In my system I use
> both MCBSP port to interface with ADC/DAC so there is no free MCBSP port.
>
> As I need another port to interface with a MCU which require a data
> rate at about 30Mb/s, so I decided to use the SPI interface. Since
> there is no free MCBSP port in my system, I use the GPIO to implement
> the SPI myself. After the implementation, I find that the clock speed
> of this GPIO type SPI interface is around 5Mb/s. My problem is as below:
>
> 1. Is there any better solution that I can use to link the MCU and DSP
> together with a data rate of ~30Mb/s.
> 2. Do anyone have try this GPIO type SPI interface approach and have
> figure on the maximum data rate about it?

Regarding GPIO-based serial I/O, I'm surprised that you could obtain 5 Mbit/sec. I
would have thought it would be slower. GPIO is only accessible on C64x devices via
CPU instructions, i.e. 'brute force'. As there is no DMA or other hardware circuitry
'dedicated' to GPIO data rate, GPIO is subject to CPU stalls due to onchip
competition for internal memory busses. I've seen delays in the range of 150 nsec
when trying to toggle a GPIO pin.

Is there a requirement to use serial I/O for your MCU? Can you use another method,
for example HPI, to talk with the MCU?

Another option is to devise a way to use 1 McBSP for the audio I/O interface. I
think it's a waste of a McBSP for the "control" interface of an audio I/O codec, as
is done on the DSK6455 and other DSK boards that use AIC23 series audio codec
devices. Control and data communication is rarely, if ever needed at the same time.
A clever design using a bus switch or mux could be implemented.

-Jeff
Dear Jeff,

Actually in my experiment I just pump data to the GPIO to implement the SPI and do not do any other task so I can get the 5Mbit/s. Which means that in real life I cannot get this 5Mbit/s since I need to perform many other different task.

In my current design, I connect a huge amount of audio CODEC to a FPGA. All the CODEC will work in an almost real time continuously. MCBSP channel switching seems not allowable due to the almost real time continuously data sampling requirement. Those CODEC sample data will pass to the DSP for processing form the FPGA via the MCBSP port. Since computering power of DSP is quite large so I design to use both MCBSP channel of the DSP to connect to two different FPGA for receiving more sampled data in parallel.

The serial interface is just use to send the processed data from the DSP to another FPGA / MCU ... for next stage of data processing. Actually it is not limited to serial bus it can be a parallel bus but I think the SPI serial bus is more easily to implement so use it as a trial. The only limitation about this bus is the data rate and it is expect to be ~30Mbit/s per each FPGA connected to the DSP via the MCBSP port stated above.

Thanks for your kind help.

Best Regards,
Albert Siu

--- 2008年7月7日 星期一,Jeff Brower 寫道﹕
寄件人: Jeff Brower
主題: Re: [c6x] Switching speed og GPIO
收件人: "Albert Siu"
副本(CC): c...
日期: 2008 7 7 星期一 下午 1:09

Albert-

> I am using the DSK6455 which includes two MCBSP port and these two
> MCBSP port of 6455 can be use as a SPI interface. In my system I use
> both MCBSP port to interface with ADC/DAC so there is no free MCBSP port.
>
> As I need another port to interface with a MCU which require a data
> rate at about 30Mb/s, so I decided to use the SPI interface. Since
> there is no free MCBSP port in my system, I use the GPIO to implement
> the SPI myself. After the implementation, I find that the clock speed
> of this GPIO type SPI interface is around 5Mb/s. My problem is as below:
>
> 1. Is there any better solution that I can use to link the MCU and DSP
> together with a data rate of ~30Mb/s.
> 2. Do anyone have try this GPIO type SPI interface approach and have
> figure on the maximum data rate about it?

Regarding GPIO-based serial I/O, I'm surprised that you could obtain 5
Mbit/sec. I
would have thought it would be slower. GPIO is only accessible on C64x devices
via
CPU instructions, i.e. 'brute force'. As there is no DMA or other
hardware circuitry
'dedicated' to GPIO data rate, GPIO is subject to CPU stalls due to
onchip
competition for internal memory busses. I've seen delays in the range of
150 nsec
when trying to toggle a GPIO pin.

Is there a requirement to use serial I/O for your MCU? Can you use another
method,
for example HPI, to talk with the MCU?

Another option is to devise a way to use 1 McBSP for the audio I/O interface.
I
think it's a waste of a McBSP for the "control" interface of an
audio I/O codec, as
is done on the DSK6455 and other DSK boards that use AIC23 series audio codec
devices. Control and data communication is rarely, if ever needed at the same
time.
A clever design using a bus switch or mux could be implemented.

-Jeff

_______________________________________
YM - 離線訊息
就算你沒有上網,你的朋友仍可以留下訊息給你,當你上網時就能立即看到,任何說話都冇走失。
http://messenger.yahoo.com.hk
Dear Michael,

May be I should provide more information about my design. In my design I will use a FPGA to sample some data and then pass to the DSP for processing via the MCBSP channel. The processed data will pass forward to another FPGA / MCU ... for another stage of data processing.

Since the computer power of the DSP is quite large, I would like to use the two MCBSP channel on the DSP so that the DSP can receive sample data from two different FPGA for collecting two individual groups of sample data for processing.

I agree with your points about the current MCBSP connection in the schematic of the DSK but I will create a new schematic and layout after I can complete and test those small experiment on the DSK. So both MCBSP will connect to the FPGA if my experiment is successful.

As the DSP processed data needs to pass to another FPGA / MCU .. for next stage of data processing so I needs to find out an interface, which is the SPI in this moment, for the DSP to send out those processed data.

Thanks for your kind help.

Best Regards,
Albert Siu

--- 2008年7月7日 星期一,Michael Dunn 寫道﹕
寄件人: Michael Dunn
主題: Re: [c6x] Switching speed og GPIO
收件人: "alberthcsiu"
副本(CC): c...
日期: 2008 7 7 星期一 上午 8:57

Albert,

On Sun, Jul 6, 2008 at 9:11 PM, alberthcsiu
wrote:
> Hi All,
>
> I am using the DSK6455 which includes two MCBSP port and these two
> MCBSP port of 6455 can be use as a SPI interface. In my system I use
> both MCBSP port to interface with ADC/DAC so there is no free MCBSP port.


I think that you are confused by the docs. Check the schematic and tech ref -
1. McBSP0 goes straight to the daughtercard.
2. McBSP1 is used for data [optionally switched to daughtercard] and
I2C is used for control/setup.

mikedunn
>
> As I need another port to interface with a MCU which require a data
> rate at about 30Mb/s, so I decided to use the SPI interface. Since
> there is no free MCBSP port in my system, I use the GPIO to implement
> the SPI myself. After the implementation, I find that the clock speed
> of this GPIO type SPI interface is around 5Mb/s. My problem is as below:
>
> 1. Is there any better solution that I can use to link the MCU and DSP
> together with a data rate of ~30Mb/s.
> 2. Do anyone have try this GPIO type SPI interface approach and have
> figure on the maximum data rate about it?
>
> Thanks in advance.
>
> Albert Siu

--
www.dsprelated.com/blogs-1/nf/Mike_Dunn.php

_______________________________________
YM - 離線訊息
就算你沒有上網,你的朋友仍可以留下訊息給你,當你上網時就能立即看到,任何說話都冇走失。
http://messenger.yahoo.com.hk
Just dummy question, as I don't know 64xx

Can't you multiplex in time your data? like odd/even or real/imag ? or can't you use several serialisers?
or Can't you use a McASP ? with several slots?

To: m...@gmail.comCC: c...From: h...@yahoo.com.hkDate: Mon, 7 Jul 2008 19:28:15 -0700Subject: Re: [c6x] Switching speed of GPIO

Dear Michael,May be I should provide more information about my design. In my design I will use a FPGA to sample some data and then pass to the DSP for processing via the MCBSP channel. The processed data will pass forward to another FPGA / MCU ... for another stage of data processing.Since the computer power of the DSP is quite large, I would like to use the two MCBSP channel on the DSP so that the DSP can receive sample data from two different FPGA for collecting two individual groups of sample data for processing.I agree with your points about the current MCBSP connection in the schematic of the DSK but I will create a new schematic and layout after I can complete and test those small experiment on the DSK. So both MCBSP will connect to the FPGA if my experiment is successful.As the DSP processed data needs to pass to another FPGA / MCU .. for next stage of data processing so I needs to find out an interface, which is the SPI in this moment, for the DSP to send out those processed data.Thanks for your kind help.Best Regards,Albert Siu--- 2008~7P@AMichael Dunn gDR
H: Michael Dunn D: Re: [c6x] Switching speed og GPIO: "alberthcsiu" ƥ(CC): c...: 2008 7 7 P@ W8:57Albert,On Sun, Jul 6, 2008 at 9:11 PM, alberthcsiu wrote:> Hi All,>> I am using the DSK6455 which includes two MCBSP port and these two> MCBSP port of 6455 can be use as a SPI interface. In my system
I use> both MCBSP port to interface with ADC/DAC so there is no free MCBSP port.I think that you are confused by the docs. Check the schematic and tech ref -1. McBSP0 goes straight to the daughtercard.2. McBSP1 is used for data [optionally switched to daughtercard] andI2C is used for control/setup.mikedunn>> As I need another port to interface with a MCU which require a data> rate at about 30Mb/s, so I decided to use the SPI interface. Since> there is no free MCBSP port in my system, I use the GPIO to implement> the SPI myself. After the implementation, I find that the clock speed> of this GPIO type SPI interface is around 5Mb/s. My problem is as below:>> 1. Is there any better solution that I can use to link the MCU and DSP> together with a data rate of ~30Mb/s.> 2. Do anyone have try this GPIO type SPI interface approach and
have> figure on the maximum data rate about it?>> Thanks in advance.>> Albert Siu>> -- www.dsprelated.com/blogs-1/nf/Mike_Dunn.php_______________________________________YM -