MDIO in flexio pins

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 
1,264件の閲覧回数
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 件の賞賛
返信
1 解決策
1,223件の閲覧回数
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 件の賞賛
返信
1 返信
1,224件の閲覧回数
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 件の賞賛
返信