MDIO in flexio pins

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MDIO in flexio pins

115 Views
elb1
Contributor III

Hello, i am trying to use MDIO for s32k116, i know that the funtion is only built in s32k148, but can i make the whole routine my self for the 2 pins (clock and data) if yes could you advise me which pins i should use, i already thought that flexio is more compatible but do you advise some function like uart or ...

0 Kudos
Reply
1 Reply

74 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

The simplest way to emulate the Serial Management Interface (SMI) using the MDC/MDIO lines on the NXP S32K118 microcontroller is by manually implementing the protocol in software using GPIOs—a technique known as bit-banging. However, this approach may struggle to maintain the typical SMI clock rate of around 2.5 MHz, which can be challenging for software-based timing.

To offload the CPU and potentially improve timing accuracy, you might consider using DMA, though this introduces complexity—particularly in handling the turnaround phase (2 clock cycles) during SMI read operations, when the MDIO line switches from output to input.

An alternative is to use the FlexIO module, which, while not natively supporting SMI, is flexible enough to emulate various protocols with a custom configuration. However, there is currently no known official implementation or guidance specifically for SMI emulation using FlexIO.

For reference, consult Application Note AN12174: Using FlexIO to Emulate Communications and Timing Peripherals (link to PDF). This document provides detailed examples of FlexIO emulating different protocols and could serve as a valuable starting point for developing your own SMI emulation.

BR, Petr

0 Kudos
Reply