Power.EthernetOscillatorEnable Lockup

@ Gus: I read somewhere that disabling Ethernet can reduce power consumption (25mA). I’m working on a battery powerd project that uses the EMX. But I don’t need a network connection at all, can I switch to PPP or Wifi without having a GPRS or WIFI module connected?

Correct, switch to PPP (you will lose one serial port) then disable the oscillator.

I have also the same request than Wouter. According to the GHI lib, disabling the oscillator would save 25mA.I do not need to use Ethernet. but I want to keep my 4 serial port. How can this be achieve? Why the Oscillator is Serial Port dependant???

@ leforban: seems like you need to move the TCP/IP stack to an other interface (PPP or Wifi), before you can disable the ethernet oscillator.

But you might try this (while measuring current consumption) and post your findings:


PPP.Enable(existingSerialPort);  // Just pass a valid serialport instance that you use for other purposes.
Power.EthernetOscillatorEnable(false);

There is a chance that the PPP class will not do anything with the port as long as you don’t call PPP.Connect… I don’t know the implementation of the PPP class but I think it’s worth to try in your case…

Ok test done: here’s the code:

// switch off the ethernet oscillator, this saves 26mA on EMX. 272mA vs 246mA
            SerialPort COMY;
            COMY=new SerialPort("COM3");
            PPP.Enable(COMY);
            GHIElectronics.NETMF.Hardware.LowLevel.Power.EthernetOscillatorEnable(false);
            COMY.Dispose();

This allows to save 26mA which in embedded world is a lot. Hope it will help other forum member.

However, I strongly believe that this has to be documented and explained here:
http://www.ghielectronics.com/downloads/NETMF/Library%20Documentation/html/43ce12d6-487e-1938-f098-9fd24bf0d34f.htm

not so fast, make sure it doesn’t crash when reading and writing serial data to the port (“COM3” in your example). And verify that reading and writing actually works.

BTW: you are talking about 272mA, while the docs say 160mA. Did you measure that on the 3V3 rail? And do you have other hardware connected?

Experiments shows that COM3 is still available for other purpose after disposing but I did not check yet data integrity on the port. The 272mA is the current consumption of the entire board (with a IMU, FTDI, Power supply (actually a linear 7805 voltage regulator and 3.3V linear regulator, optocoupler for NMEA, a tons of IO, leds…)).

According to this: http://www.ghielectronics.com/catalog/compare/

Power consumption is 200mA when active, 160 when Idle, 40 when sleep. With respect to the amount of peripherals that I add on the system and according to the fact that we use on this version two linear regulator, this seems to me not surprising. We hope better results with our new schematics where a buck boost power supply has been designed.

Let me check the data integrity for the COM3.
Edit: Data integrity on COM3 is correct, this shows that this process to reduce power consumption is possible without losing the other functionnalities(USBH or SerialPort). For sure it has to be double checked (especially in term of stability and for USBH that I have not checked).

Thanks for the values, they make more sence then the values in the comparison. F.e. for the Cobra, was that 200mA measured on a 6V source or on a 9V source? They should mention that or express the consumption in mW.

In our case the current was 246 mA from 7 to 32V (due to Joule dissipation of voltage*current overhead)… Yes this is a hot board :slight_smile:

After succeeding to erase the lock, it seems that there still something wrong. In fact the first deploy is ok but if you want to deploy on a EMX that already has it’s oscillator disable, you can not. You are obliged to manually reboot the platform. VS can restart the board and manage it for debugging…

This is strange but if it is the case, perhaps only add this when you are done debugging your application?

Hi GUS, I already add this only on release version but this seems to me as a workaround, not the solution to this issue. For sure I can let it like that but how to know if there’s no other side effect…