ethernet init issues, 3.2 and 3.6

Status
Not open for further replies.

twilkers

Well-known member
Hi,

Been using teensy 3.2 for a while, have always had intermittant ethernet init issues. An annoying issue is that 820io inits properly for a while, then doesn't, giving 0.0.0.0 instead of my fixed IP address. I have a couple 3.6 boards with newer ethernet, thought I would try that. With same code and build, this first one inits at 255.255.255.255, apparently same error. The build is using older 5100.h.

I added a long delay after ethernet.begin as I read in one of the posts but this didn't seem to help. I am using the gpio dance listed on the 820io webpage but also didn't seem to help in either case. I'm currently using teensyduino 1.35.

How can I resolve fundamental init error? I want to be able to use either teensy for different applications. Code and build log attached.

thanks in advance,
tim
 

Attachments

  • teensy_webserver_RevE7_2017_2_5_TRPM_err.ino
    20.6 KB · Views: 105
  • 3_6 build process.txt
    21 KB · Views: 138
Macaba,

I did get this going, my issue was a very dumb one. While I did include Paul's code, I left off the last line which deasserts the reset line. so, of course the part could not init, as I was holding reset asserted. shame on me.

thanks for your help,
tim
 
so, my ethernet init is working reliably now on teensy 3.2, but still have issue with 3.6. code attached. suggestions?

apologies for not cutting down code size at this point. all I did was recompile for 3.6, no other changes.

I get init ip of 255.255.255.255 instead of my fixed ip.
 

Attachments

  • teensy_webserver_3_6_RevF2_2017_2_8.ino
    20.9 KB · Views: 106
Have you tried running this before Ethernet.begin()

pinMode(9, OUTPUT);
digitalWrite(9, LOW); // reset the WIZ820io
delay(1000);
digitalWrite(9, HIGH); // release the WIZ820io

It's entirely possible that the current code (from the PJRC website) you've got runs too fast as it has no delays until after all the pins have been toggled.
 
3,3v is on the board but no leds. I reduced cpu speed to 96Mhz, no help. Added 1 sec delay per following, no joy. would the SD card deselect affect this?

pinMode(9, OUTPUT);
digitalWrite(9, LOW); // reset the WIZ820io
pinMode(10, OUTPUT);
digitalWrite(10, HIGH); // de-select WIZ820io
pinMode(4, OUTPUT);
digitalWrite(4, HIGH); // de-select the SD Card
delay(1000);
digitalWrite(9, HIGH); // end reset pulse
delay(150);
 
all I did was recompile for 3.6, no other changes.

I get init ip of 255.255.255.255 instead of my fixed ip.

Code looks like it should work.

Perhaps the hardware isn't connected properly. Maybe post some photos so we can see? Maybe one of us will notice something...
 
pics below.

the first two are in the big stack with the power stuff as well and an adapter board I made up. the third is teensy and eth alone, same symptom in both settings, pic also included.

I can update this teensy fine by changing blink duty cycle, so that board alone is good.

I am supplying an external power supply to the 3.6 as I have on the 3.2 in the big stack. I'm using 11 of the converter inputs.

suggestions welcome.

tim
 

Attachments

  • 3_6 pic1.jpg
    3_6 pic1.jpg
    109.7 KB · Views: 140
  • 3_6 pic2.jpg
    3_6 pic2.jpg
    115.9 KB · Views: 164
  • 3_6 pic3, teensy alone.jpg
    3_6 pic3, teensy alone.jpg
    201.7 KB · Views: 130
Oh, you're trying to use the native ethernet prototype (which has no software support yet) with the normal ethernet library which only works with Wiznet chips!

Sorry, this hardware won't work. It's not supported yet, other than a couple small test programs.
 
Thanks Paul, I didn't realize. Is there a reasonable lib I can use now on a preliminary basis? I thought I saw several benchmarked Ethernet examples for 3.6
 
For now, WIZ820io and WIZ850io are the only usable ethernet hardware. Well, the W5100 chip also works, but it's so slow that you really don't want to use it.

Eventually, software support for the native ethernet will mature. But that day is not close. My best guess is "sometime in 2018". While I do expect to make some progress on it this year, to be realistic it's a huge project that's going to take time to reach a really usable state. A long list of other projects are planned first, like the 2nd USB port which I'm working on right now.
 
Thanks for the timeframe estimate Paul. It's always helpful to have a realistic expectation

Have a good one

Tim
 
Hi all,

Wondering about teensy 3.6 ethernet lib status at this point. Earlier February comment was 2018. looking for an update if possible?

I have an older T3.2 sketch I'd like to bring up.

thanks in advance,
tim
 
There has been some progress with the lwIP implementation (polling and callbacks). You can now build a sketch in the IDE (modification to boards.txt required) or with Visual Studio. See
https://forum.pjrc.com/threads/45647-k6x-LAN8720(A)-amp-lwip
stepl's zip file has web server(httpd) example.

The API is not compatible with Arduino/Teensy Ethernet lib, and the polling and callback architecture requires some thought (avoiding long delay())
 
Last edited:
Status
Not open for further replies.
Back
Top