Author Topic: ENC28J60 Ethernet controller intermittent startup failures  (Read 1952 times)

0 Members and 1 Guest are viewing this topic.

Offline joegtpTopic starter

  • Contributor
  • Posts: 30
ENC28J60 Ethernet controller intermittent startup failures
« on: February 21, 2017, 06:47:15 pm »
2 times out of 10 my ENC28J60 fails to startup. It's mounted on a custom PCB using Contiki's Driver https://github.com/contiki-os/contiki/tree/master/dev/enc28j60 powered by a linear 3.3V voltage regulator. The MCU starts up find and can talk with the ENC28J60 (registers, etc) but I get no traffic in or out from Ethernet. I thought at first it might be a power rail issue but after measuring the 3.3V rail on the oscilloscope it never drops below 3.25V. My next thought was the oscillator not starting up, but probing that it looks fine as well at 25MHz. I was hoping someone might have some other troubleshooting tips to track this down.
 

Offline Scrts

  • Frequent Contributor
  • **
  • Posts: 797
  • Country: lt
Re: ENC28J60 Ethernet controller intermittent startup failures
« Reply #1 on: February 21, 2017, 08:45:11 pm »
Does it have a reset pin? You did not provide a link to the datasheet. Try to power it up in controlled behavior. Check when 3V3 is good (power-good pin) and then release the reset.
 

Offline joegtpTopic starter

  • Contributor
  • Posts: 30
Re: ENC28J60 Ethernet controller intermittent startup failures
« Reply #2 on: February 22, 2017, 04:53:06 pm »
Oops sorry http://www.microchip.com/wwwproducts/en/en022889

Just verified, I'm pulling the ~reset pin low until I start SPI communications with it. There is an errant (#2) regarding startup but the code has a 2ms sleep which should mitigate this.

I just changed the code a little bit to try and send data a couple times and if that fails I hard reset the chip using the reset pin and it appears to solve the issue but this is not elegant at all since it requires an extra couple seconds to the startup process 2 out of 10 times.

The more I play with it the more it appears to be an oscillator issue. I might try hooking up my o-scope to the reset pins and an oscillator pin to check the timing of oscillator startup. I'll also look up the caps I'm using on the oscillator which might be causing startup issues.
 

Offline Scrts

  • Frequent Contributor
  • **
  • Posts: 797
  • Country: lt
Re: ENC28J60 Ethernet controller intermittent startup failures
« Reply #3 on: February 22, 2017, 08:13:43 pm »
I've worked with this chip a little bit and hated it. It always crashed when connected to any network bigger than 3-4 clients. Point-to-point connection seemed to be OK. It's also a beast in terms of current consumption comparing to what it does...
 

Offline joegtpTopic starter

  • Contributor
  • Posts: 30
Re: ENC28J60 Ethernet controller intermittent startup failures
« Reply #4 on: February 22, 2017, 09:06:11 pm »
Any alternatives you could recommend?
 

Offline Scrts

  • Frequent Contributor
  • **
  • Posts: 797
  • Country: lt
Re: ENC28J60 Ethernet controller intermittent startup failures
« Reply #5 on: February 23, 2017, 01:47:13 pm »
I've switched to STM32+Micrel PHY later on, but people around used http://www.microchip.com/wwwproducts/en/en541877 for small projects with success.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf