Reset ethernet chip

I’ve about 70 devices with Colibri T30 modules on a production site. These modules run old WinCE 7.0 images prior ver 2.0b2.
Some of them (not all) contain an ethernet issue #15455.
All the devices are in work and we can’t update the all images in a near future.
But we’re able to remotely upload a workaround executable.

The workaround way is to reset GPIO V4, according to the release changelog.
I code it, but can’t see any changes in ethernet work. Ping gives stable times while V4 output changes.

Reset is done by these steps:

  • GPIO.V4 func set to GPIO output
  • GPIO.V4 = 1 wait 50 ms GPIO.V4 = 0
  • wait 50 ms
  • GPIO.V4 = 1
  • wait 50 ms
  • GPIO.V4 func set to GPIO input

Is this enough to reset the ethernet chip?

Dear @protasovdg

Your approach should work fine to reset the ethernet controller.

We used the following code (The CPU, the ethernet controller and a pull-up are the only connections on this net. Driving GPIO.V4 [Edit: Use GPIO.DD0 for T30] to output-high, or leaving it High-Z are both valid):
[The code below was edited after finding that the wrong GPIO was used]

#include <windows.h> 
#include "gpioLib.h" 

#define GPIO_V4     (172)       // numeric representation of the GPIO V4 (T20)
#define GPIO_DD0    (232)       // numeric representation of the GPIO DD0 (T30)

int WINAPI WinMain(HINSTANCE hInstance,      // handle to current instance                   
                   HINSTANCE hPrevInstance,  // handle to previous instance                   
                   LPWSTR lpCmdLine,         // pointer to command line                   
                   int nCmdShow)             // show state of window                   
{    
    InitGPIOLib();

    // ¯¯¯\_/¯¯¯ 10ms negative pulse on GPIO V4/DD0 to reset the Ethernet controller
    //SetGPIOLevel(GPIO_V4, 0);    // T20  
    SetGPIOLevel(GPIO_DD0, 0);     // T30
    Sleep(10);
    //SetGPIOLevel(GPIO_V4, 1);    // T20
    SetGPIOLevel(GPIO_DD0, 1);     // T30

    DeInitGPIOLib();
    return(TRUE);
}

Can you please test this code, even though I don’t expect to see any different behavior from your implementation.
Get back to me if the issue remains. I assume we need to investigate for different reasons in that case.

Regards, Andy

Hi, @andy.tx!
I’ve tested your code and didn’t see any changes in ping responses. So, the behaviour is still the same.
Only exception is that gpioconfig shows no output level change while tracing the code, because AltFn. of GPIO.V4 is I2C4-CLK after power on.

Anyway, I’ll try to upload and run this workaround. The ethernet problem arises not very frequently on the devices. We’ll have to wait for results.

Dear @protasovdg
I just found an error in our documentation: The LAN controller’s RESET_N signal is connected to:

  • GPIO V4 (GPIO 172) on Colibri T20
  • GPIO DD0 (GPIO 232) on Colibri T30

Please try to use the code above and replace the GPIO number!
I appreciate your feedback whether this solves the problem.

Regards, Andy

Thank you, @Andy.Tx!
Now it works, the ethernet link goes down and up again after the reset issued. I think, the problem is solved.

Thank you, @Andy.Tx!
Now it works, the ethernet link goes down and up again after the reset issued. I think, the problem is solved.

Hello @alex.tx,

is the reset also possible on the Apalis i.MX6 Module and if yes, which GPIO is connected to the RESET_N signal here?

Thanks!

André

Hi @AndreTucker , Could you please create a new thread an provide more details abut your problem there?

Hi, see https://www.toradex.com/community/questions/64295/reset-ethernet-chip-apalis-imx6.html