I need to use this command because the Ethernet oscillator interferes with GPS.
However, when I run this command on an EMX module, it more often than not causes the EMX to lockup after a duration of 0-20 seconds after the command.
What is the cause and how can we fix this?
This is very unusual! Can you show your repro code
public class Program
public static void Main()
// Blink board LED
bool ledState = false;
// my board has led on 17
OutputPort led = new OutputPort((Cpu.Pin)FEZ_Pin.Digital.IO17, ledState);
// Sleep for 500 milliseconds
// toggle LED state
ledState = !ledState;
Can someone repro this?
I’m trying to base a product around the EMX and am stuck because the Ethernet doesn’t power off.
You reported this over the holiday weekend!. Please give us just one day and we will get back to you
Seems like the network stack is getting hung up when the Ethernet is stopped.
PPP.Enable(new SerialPort(“COM1”)); // There is no reason to access Ethernet after this
Thank you, that stops the lockup.
I noticed too that adding a 10 second sleep before the command also helped, but it wasn’t elegant.
Is the goal of this command to send the Power Down command to the DP83848K?
If so, do you have any idea why the EMX TD- (pin 45) still shows a signal after this command is executed?
Power.EthernetOscillatorEnable(false); turns off the 50Mhz. oscillator belonging to DP83848K to save power. DP83848K action is undefined at this point.
How are you doing that? (a schematic of the EMX would be so useful to save questions like this…)
Are you switching the oscillator though T3 or something?
Do you have a link to the DP83848K serial management interface that we could use to turn the PHY off?
[quote]How are you doing that? (a schematic of the EMX would be so useful to save questions like this…)
Are you switching the oscillator though T3 or something?[/quote]
The Oscillator used has an enable pin which is controlled by one of the Processor’s IOs.
I don’t think this interface is used on EMX.
If you are concerned about the power consumption the the phy itself ,the PHY is supposed to shut down automatically if no energy is detected.
It looks like Energy Detect is another register option that would need enabling. And there isn’t a pin strap to enable.
So you’re not getting maximum power savings, but that isn’t my goal.
Basically I have a custom board with an EMX mounted.
We have a GPS module on the board and it refuses to lock due to some kind of interference from the EMX.
I am trying to shut things down to remove that problem.
NOTE: There is another [italic]really [/italic]nasty side effect of using the Power.EthernetOscillatorEnable(false) call:
Create a project and enter the 2 lines of code from above (PPP.Enable & Power.EthernetOscillatorEnable lines).
From within VS, Run and then select Restart. The code will load and go rebooting and everything is fine.
From within VS, select Restart. The code will stop at ‘Rebooting’ and never continue. Not good. (Stop and Run is the same as Restart)
If you ‘work around’ this by pressing a board reset button when it is waiting to reboot, then it appears to run… however all is not well.
I have a SerialPort with a DataReceived event handler. When you reboot the EMX using the ‘reset’ workaround, the DataReceived events never fire!!!
I can breakpoint and see the SerialPort object has BytesToRead, but for some reason doing a reset doesn’t enable the event processing.
Removing the Power.EthernetOscillatorEnable line and things are restored back to normal. After one reset/reload.
Did you open the port before adding the data receive handler?
My of course answer was a little ambiguous and perhaps you read it as that was the problem.
A more precise answer is:
Of course I am assigning the event handler before opening the port, otherwise I would miss some data.
The problem, as described, exists.
you need to open the port first
That did fix the lack of serial data. The unit not cleanly rebooting when the OSC is disabled appears to remain. Although perhaps that is not due to that… perhaps they don’t always reboot anyway?
The reset button is a workaround anyway.
I am also experiencing the same problem, using:
locks the EMX after several second. Then VS can’t reboot the unit to deploy new code. The only workaround is to reset the board after asking for VS deployment. But in all cases the EMX locks after a while if I disable the Ethernet Oscillator.
Sorry to push up this post again but I really think there’s something wrong with Ethernet Oscillator Enable method.
This post starts already ten month ago but no solution have been found for this issue. To summarize: here’s a really trivial code sample as unit test:
This code locks the EMX.
public class Program
public static void Main()
You can only disable the oscillator if you switch to PPP or WiFi first.