Forum Rule: Always post complete source code & details to reproduce any issue!
Page 2 of 2 FirstFirst 1 2
Results 26 to 40 of 40

Thread: W5100 Ethernet shield preventing Teensy 3.2 from reprogramming

  1. #26
    Senior Member
    Join Date
    Jun 2016
    Posts
    122
    Hi,

    I'm just getting started with teensy 3.2 and this forum, and am migrating a working sketch using R3 ethernet shield(from arduino). I've made the changes noted in this thread, but I still can't seem to program the teensy with ethernet stack in place. I can program the teensy with the sparkfun adapter and teensy alone. The ethernet shield works find using an arduino mega2560.

    I did make the mod for 10k pullup on the sparkfun adapter instead of the ethernet shield so all changes were contained on a single board. would this make a difference?

    thanks,
    tim

  2. #27
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,587
    Quote Originally Posted by twilkers View Post
    I did make the mod for 10k pullup on the sparkfun adapter instead of the ethernet shield so all changes were contained on a single board. would this make a difference?
    Yes. You also need to add the IOREF connection to 3.3V for the R3 ethernet. R2 and earlier don't use IOREF, but R3 does.

    Look at the 2nd picture I posted in msg #22. It's that little white wire.

  3. #28
    Senior Member
    Join Date
    Jun 2016
    Posts
    122
    Quote Originally Posted by PaulStoffregen View Post
    Yes. You also need to add the IOREF connection to 3.3V for the R3 ethernet. R2 and earlier don't use IOREF, but R3 does.

    Look at the 2nd picture I posted in msg #22. It's that little white wire.
    Yes I added what I thought was an equivalent to the white wire, on the spark fun adapter instead of the Ethernet shield, it's that not adequate? Seems since the pins are common between boards, the jumper could be added in either location.

  4. #29
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,587
    It should work regardless of where you make the connection, as long as IOREF is really getting 3.3V.

    Maybe something else isn't connected properly? Can you post photos of how you've actually got it all built?

  5. #30
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,587
    As a quick sanity check, I just retested with my Ethernet R3 shield. It does work.

    Click image for larger version. 

Name:	ethR3.jpg 
Views:	48 
Size:	90.1 KB 
ID:	7292

    This R3 shield does not require the reset pullup resistor (it apparently has its own pullup). If your R3 shield looks the same, you can probably leave the resistor off and focus your efforts elsewhere.

    A quick voltmeter check might help. Make sure both IOREF and 3.3V are high, and RESET is also high (I measured 4.63 on this genuine Arduino Ethernet R3). Fortunately the R3 shield has these signals nicely labeled, so measuring them with voltmeter and a scrap of wire is pretty easy.

    Click image for larger version. 

Name:	ethR3_b.jpg 
Views:	38 
Size:	83.9 KB 
ID:	7293

    Just be extremely careful not to accidentally short 5V and 3.3V together if you have dangling wires... if those 2 touch each other, both Teensy and the Ethernet shield will be destroyed.

  6. #31
    Senior Member
    Join Date
    Jun 2016
    Posts
    122
    ok, here are pics of my setupClick image for larger version. 

Name:	IMG_2890.jpg 
Views:	51 
Size:	154.2 KB 
ID:	7294Click image for larger version. 

Name:	IMG_2891.jpg 
Views:	50 
Size:	154.8 KB 
ID:	7295Click image for larger version. 

Name:	IMG_2892.jpg 
Views:	52 
Size:	174.6 KB 
ID:	7296

    the switch hanging out is so I can reprogram the teensy with the ethernet shield in place.

    tim

  7. #32
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,587
    Are those SPI pins tall enough to properly mate with the SPI socket on the ethernet shield? They looks a little short....

  8. #33
    Senior Member
    Join Date
    Jun 2016
    Posts
    122
    Quote Originally Posted by PaulStoffregen View Post
    Are those SPI pins tall enough to properly mate with the SPI socket on the ethernet shield? They looks a little short....
    Yes the spi pins bottom out in the connector. You are seeing the cut off pins on the back of the board, not the mating side. I needed to mount it unconventionally because of the needed height and the length of pins that I had on hand.

    Would no spi connection prevent a program from loading?

    I can see the sketch might not work correctly, but I would expect it to load. I added the pin13 led writes to my program as an indicator of successful program load on teensy 3.2.

  9. #34
    Senior Member
    Join Date
    Jun 2016
    Posts
    122
    regarding voltages, the end pin seems not labeled on my board.
    IOREF = 3.3v, second pin in
    RESET = 3.5v, third pin in

  10. #35
    Senior Member
    Join Date
    Jun 2016
    Posts
    122
    I received a new teensy board yesterday and with it installed I get same result as measured above for IOREF and RESET. my new ethernet boards don't arrive till thursday.

    I can program blink program to teensy with or without the ethernet board attached, but my previous program (from arduino mega) doesn't seem to load. I added same led writes to it as are on the blink program to use as an indicator of operation, no leds, no ethernet. there is a lot of blinking on the ethernet board, ust not on teensy.

    suggestions?

  11. #36
    Senior Member
    Join Date
    Jun 2016
    Posts
    122
    Quote Originally Posted by twilkers View Post
    I received a new teensy board yesterday and with it installed I get same result as measured above for IOREF and RESET. my new ethernet boards don't arrive till thursday.

    I can program blink program to teensy with or without the ethernet board attached, but my previous program (from arduino mega) doesn't seem to load. I added same led writes to it as are on the blink program to use as an indicator of operation, no leds, no ethernet. there is a lot of blinking on the ethernet board, ust not on teensy.

    suggestions?
    got the new teensy board, and now back to this project. same result. attached is my sketch. suggestions?
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	teensy stack.jpg 
Views:	24 
Size:	158.5 KB 
ID:	7945  
    Attached Files Attached Files
    Last edited by twilkers; 08-30-2016 at 02:37 PM. Reason: add pic

  12. #37
    Senior Member
    Join Date
    Jul 2014
    Posts
    2,344
    Quote Originally Posted by twilkers View Post
    got the new teensy board, and now back to this project. same result. attached is my sketch. suggestions?
    did you connect a terminal? setup is waiting for a terminal to bennected
    you could also use
    Code:
    while(!Serial && millis()<3000);
    to wait for usb-terminal, up to 3 seconds

  13. #38
    Senior Member
    Join Date
    Jun 2016
    Posts
    122
    I was just using a browser as I did on the arduino side. the IP address is never recognized. ping says host unreachable.

    same sketch(compiled for mega), same ethernet board, same analog shield works fine on mega.

    in my serial window, the server initializes as 255.255.255.255 instead of the expected 192.168.1.18 in the code. on mega, initializes properly to 192.168.1.18. code is running as I am pushing out an array index.

    so, oddly, seems like an init issue between teensy and mega.
    Last edited by twilkers; 08-30-2016 at 03:05 PM.

  14. #39
    Senior Member
    Join Date
    Jul 2014
    Posts
    2,344
    Quote Originally Posted by twilkers View Post
    I was just using a browser as I did on the arduino side. the IP address is never recognized. ping says host unreachable.

    same sketch(compiled for mega), same ethernet board, same analog shield works fine on mega.

    in my serial window, the server initializes as 255.255.255.255 instead of the expected 192.168.1.18 in the code. on mega, initializes properly to 192.168.1.18. code is running as I am pushing out an array index.

    so, oddly, seems like an init issue between teensy and mega.
    If you look into setup() the program does not go further than
    Code:
    while(!Serial) {;}
    either add the mods I mentioned earlier or comment that line.

  15. #40
    Senior Member
    Join Date
    Jun 2016
    Posts
    122
    ok, commented out suggested code, doesn't ping, browser request times out. only difference in serial monitor window is the server doesn't spit out 255.255.255.255 as it previously did. this line has disappeared, but my serial writes of an array index persists.

    with the addition of your suggestion, and earlier line commented out, the serial monitor page shows 0.0.0.0 with continued array_index. ping says unreachable and browser still times out. see attached pic

    Click image for larger version. 

Name:	teensy debug serial monitor.jpg 
Views:	41 
Size:	141.6 KB 
ID:	7948
    Last edited by twilkers; 08-31-2016 at 12:16 AM. Reason: add pic

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •