cancel
Showing results for 
Search instead for 
Did you mean: 

How to adapt SFP modul with Cortex-M microcontroller?

SOelk.1
Associate

Hello everyone,

I need some ideas and recommendations on how to solve the following problem effectively.

Our customer wants to use SFP modules (1000 Base-SX standard) to send some data to a remote computer. As there is only very little data to be transferred (actually no real need for gigabit), a Cortex-M microcontroller would probably do the job.

What would be the best approach to adapt the fiber optical SFP modul? From what I've found, most microcontrollers only have a MII or RMII interface. The only information I've found on the SFP modules is from the following document: SFP modules. What controller and PHY would you recommend for this project?

How would the design change, if we want to add a copper SFP interface as well? Copper and fiber would never be active at the same time. What PHY would you recommend then?

Your help is very much appreciated.

Thanks a lot.

Best regards,

Samuel

3 REPLIES 3
Peter BENSCH
ST Employee

Welcome, @SOelk.1​, to the community!

The great advantage of MII or RMII is that with a suitable PHY, Ethernet can be realised via any media. All you have to do is select an appropriate PHY from one of the many manufacturers (STMicroelectronics is not one of them).

My search engine finds many offers with "+rmii +phy +sfp" or "+mii +phy +sfp", maybe there is something suitable among them?

Hope that helps?

Regards

/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
SOelk.1
Associate

Thanks for your reply. I think my main problem is indeed the selection of a suitable PHY.

Let's say I want to use a STM32F769 microcontroller. It comes with a 10/100 MAC interface.

On the other end, I have SFP moduls, either copper or fiber, 1000 Base-SX or 1000 Base-T.

I've checked some datasheets of SFP modules and they all seem to have the same interface, although, many SFP modules are described as "brand xy" compliant. Does this mean there are hardware or software differences depending on the brand?

From what I understand, for our application a PHY has to be capabable of handling copper and fiber SFPs. Not all PHYs explicitly state they are. So apparently, there has to be a difference by used media?

And last but not least, there is the speed compatibility. Ethernet should be backwards compatible, but I'm not sure a 1000 Base-T or 1000 Base-X SFP is actually capable of handling slower speeds. And if the SFP is, can it actually be connected to a 10/100 STM32 MAC?

Seriously, these SFPs are so confusing. I havn't found any examples or similar projects online. I'm currently doubting this whole approach makes sense. But what other options are there? Building our own transceivers doesn't make sense either.

Best regards,

Samuel

Bob S
Principal

Use the STM32F769's MII/RMII interface to connect its MAC to an external PHY. The PHY then connects to the SFP. See @Peter BENSCH​ search suggestions above.

SFP modules use the same (standard) interface whether they are copper, fiber, whatever. There is an I2C interface to talk to the SFP's EEPROM, so you can tell what kind of device is plugged in. There there are a single differential pair for TX and a pair for RX that go between your PHY and the SFP (along with status/error lines, etc.).