Spark Logic

ENC28j60 fail

ENC28J60 SPDIP-28 Pinout
ATmega328 TQFP-32 Pinout
STM32F103C8T6 LQFP48 Pinout

Hello ,
I’m ethernet problems with ENC28J60ENC28J60Communications, navigation, interfaces and RFID… have some compatibility issues with some routers so looks like I have to swap it to ENC28J60 . xebbmw Tue Sep 12, 2017 10:13 am [alce – Mon Sep 11, 2017 11:19 pm] – I have not pu…View in hardware catalog module, I bought the card in the aliexpress . [img] https://pt.aliexpress.com/item/1pcs-STM … .81.GS0mOZ[/img]

tested in arduino 1.6.3 and 1.6.11.

my code example ENC28J60ENC28J60Communications, navigation, interfaces and RFID… have some compatibility issues with some routers so looks like I have to swap it to ENC28J60 . xebbmw Tue Sep 12, 2017 10:13 am [alce – Mon Sep 11, 2017 11:19 pm] – I have not pu…View in hardware catalog :

// PIN Connections (Using STM32F103):
//
// ENC28J60 -  STM32F103
//   VCC    -    3.3V
//   GND    -    GND
//   SCK    -    Pin PA5
//   SO     -    Pin PA6
//   SI     -    Pin PA7
//   CS     -    Pin PA8
//-----------------------------------------------------------------
//
//
#include <EtherCard_STM.h>
#include <SPI.h>
#define REQUEST_RATE 5000 // milliseconds
// ethernet interface mac address
static byte mymac[] = { 0x74,0x69,0x69,0x2D,0x30,0x31 };
// remote website name
const char website[] PROGMEM = "google.com";

byte Ethernet::buffer[700];
static long timer;

// called when the client request is complete
static void my_result_cb (uint8_t status, uint16_t off, uint16_t len) {
Serial1.print("<<< reply ");
Serial1.print(millis() - timer);
Serial1.println(" ms");
Serial1.println((const char*) Ethernet::buffer + off);
}
void setup () {
Serial1.begin(19200);
Serial1.println("\n[getDHCPandDNS]");
if (ether.begin(sizeof Ethernet::buffer, mymac) == 0)
Serial1.println( "Failed to access Ethernet controller");
if (!ether.dhcpSetup())
Serial1.println("DHCP failed");
ether.printIp("My IP: ", ether.myip);
// ether.printIp("Netmask: ", ether.mymask);
ether.printIp("GW IP: ", ether.gwip);
ether.printIp("DNS IP: ", ether.dnsip);
if (!ether.dnsLookup(website))
Serial1.println("DNS failed");
ether.printIp("Server: ", ether.hisip);
timer = - REQUEST_RATE; // start timing out right away
}
void loop () {

ether.packetLoop(ether.packetReceive());

if (millis() > timer + REQUEST_RATE) {
timer = millis();
Serial1.println("\n>>> REQ");

ether.browseUrl(PSTR("/foo/"), "bar", website, my_result_cb);

}
}

Replies17

Wed Aug 31, 2016 8:29 pm

you posted a picture of the ‘Blue PillBlue PillDevelopment and computing boards…as become my new favorite board. I am calling it “blue pad” and it is kind of super “ blue pill ”. Pito Thu Jul 27, 2017 8:53 pm [victor_pv – Thu Jul 27, 2017 3:58 pm] – Just for…View in hardware catalog ” – not a network module.
stephen

Thu Sep 01, 2016 1:57 am

Hi, Sorry.
O AM use a ENC28J60ENC28J60Communications, navigation, interfaces and RFID… have some compatibility issues with some routers so looks like I have to swap it to ENC28J60 . xebbmw Tue Sep 12, 2017 10:13 am [alce – Mon Sep 11, 2017 11:19 pm] – I have not pu…View in hardware catalog with Maple MiniMaple MiniDevelopment and computing boards…8MHz petertumler Thu Sep 24, 2015 10:58 am Hi, I’m trying to underclock a STM32F103 ( Maple Mini ) to 48MHz (for energy efficiency reasons). According to the datasheet .. The full…View in hardware catalog .
Not work ENC28J60ENC28J60Communications, navigation, interfaces and RFID… have some compatibility issues with some routers so looks like I have to swap it to ENC28J60 . xebbmw Tue Sep 12, 2017 10:13 am [alce – Mon Sep 11, 2017 11:19 pm] – I have not pu…View in hardware catalog with Maple MiniMaple MiniDevelopment and computing boards…8MHz petertumler Thu Sep 24, 2015 10:58 am Hi, I’m trying to underclock a STM32F103 ( Maple Mini ) to 48MHz (for energy efficiency reasons). According to the datasheet .. The full…View in hardware catalog “STM32F103STM32F103Microcontrollers and processors…19.html . ag123 Sat Apr 28, 2018 5:54 pm come to think of it blue pill / maple mini ( stm32f103 ) is an *ideal* keyboard controller, the scanning can be done with assistance of sh…View in hardware catalog ”.

Thu Sep 01, 2016 3:26 am

Why didnt you just search the forum for anyone else who has used the ENC28J60ENC28J60Communications, navigation, interfaces and RFID… have some compatibility issues with some routers so looks like I have to swap it to ENC28J60 . xebbmw Tue Sep 12, 2017 10:13 am [alce – Mon Sep 11, 2017 11:19 pm] – I have not pu…View in hardware catalog

I quickly found this

https://github.com/Serasidis/Ethernet_STM

Which seems to use the same Ethernet chip

Thu Sep 01, 2016 10:49 am

hello RogerClark ,
I am creating an application that sends data through the internet using GET PHP before I used the ATmega328ATmega328Microcontrollers and processors…al port without resetting, the 16u2 send a pulse of about 4 us to the RX port of the Atmega328 . This pulse can be interpreted as a characher that depends on baudrate A 256000 you…View in hardware catalog , but I miguei for STM32F103STM32F103Microcontrollers and processors…19.html . ag123 Sat Apr 28, 2018 5:54 pm come to think of it blue pill / maple mini ( stm32f103 ) is an *ideal* keyboard controller, the scanning can be done with assistance of sh…View in hardware catalog for reasons of memory and better performance.
When I used the ATmega328ATmega328Microcontrollers and processors…al port without resetting, the 16u2 send a pulse of about 4 us to the RX port of the Atmega328 . This pulse can be interpreted as a characher that depends on baudrate A 256000 you…View in hardware catalog with ENC28J60ENC28J60Communications, navigation, interfaces and RFID… have some compatibility issues with some routers so looks like I have to swap it to ENC28J60 . xebbmw Tue Sep 12, 2017 10:13 am [alce – Mon Sep 11, 2017 11:19 pm] – I have not pu…View in hardware catalog everything it worked properly, but I’m now using STM32F103STM32F103Microcontrollers and processors…19.html . ag123 Sat Apr 28, 2018 5:54 pm come to think of it blue pill / maple mini ( stm32f103 ) is an *ideal* keyboard controller, the scanning can be done with assistance of sh…View in hardware catalog with ENC28J60ENC28J60Communications, navigation, interfaces and RFID… have some compatibility issues with some routers so looks like I have to swap it to ENC28J60 . xebbmw Tue Sep 12, 2017 10:13 am [alce – Mon Sep 11, 2017 11:19 pm] – I have not pu…View in hardware catalog and does not work .

I use the STM32duino -master library, usually carries STM32F103STM32F103Microcontrollers and processors…19.html . ag123 Sat Apr 28, 2018 5:54 pm come to think of it blue pill / maple mini ( stm32f103 ) is an *ideal* keyboard controller, the scanning can be done with assistance of sh…View in hardware catalog ( Maple MiniMaple MiniDevelopment and computing boards…8MHz petertumler Thu Sep 24, 2015 10:58 am Hi, I’m trying to underclock a STM32F103 ( Maple Mini ) to 48MHz (for energy efficiency reasons). According to the datasheet .. The full…View in hardware catalog ) , but it seems not work.

I am using the IDE arduino 1.6.3 .

Someone using the Arduino IDE and ENC28J60ENC28J60Communications, navigation, interfaces and RFID… have some compatibility issues with some routers so looks like I have to swap it to ENC28J60 . xebbmw Tue Sep 12, 2017 10:13 am [alce – Mon Sep 11, 2017 11:19 pm] – I have not pu…View in hardware catalog and Maple MiniMaple MiniDevelopment and computing boards…8MHz petertumler Thu Sep 24, 2015 10:58 am Hi, I’m trying to underclock a STM32F103 ( Maple Mini ) to 48MHz (for energy efficiency reasons). According to the datasheet .. The full…View in hardware catalog with a GET php sample code , please help me .
thank you now.

Thu Sep 01, 2016 11:03 am

see the tests failed DNS with my serial1 , bad when I use ATmega328ATmega328Microcontrollers and processors…al port without resetting, the 16u2 send a pulse of about 4 us to the RX port of the Atmega328 . This pulse can be interpreted as a characher that depends on baudrate A 256000 you…View in hardware catalog everything works normally.
[getDHCPandDNS]
DNS failed

>>> REQ

>>> REQ

>>> REQ

>>> REQ

>>> REQ

>>> REQ

>>> REQ

>>> REQ
<<< reply 1077 ms
tii-01Àêäd
<<< reply 1077 ms
tii-01Àêäd

>>> REQ
<<< reply 371 ms
tii-01Àêäd

Thu Sep 01, 2016 12:01 pm

Try PM’ing @vassilis he wrote that code, I don’t have that hardware

Thu Sep 01, 2016 2:17 pm

Check if it works with 8.8.8.8 instead of google.com

Thu Sep 01, 2016 2:52 pm

Hello everyone,
yet still the same error . see the serial monitor :
[getDHCPandDNS]
DNS failed

>>> REQ

>>> REQ

>>> REQ

>>> REQ

>>> REQ

>>> REQ

>>> REQ

>>> REQ
<<< reply 185 ms
tii-01Àêäd
<<< reply 186 ms
tii-01Àêäd

>>> REQ
<<< reply 538 ms
tii-01Àêäd

Thu Sep 01, 2016 2:55 pm

I need the STM32STM32Microcontrollers and processors…Map magic glue code, ethernet compiles, just WARNING: library LwIP claims to run on [ stm32 ] architecture(s) and may be incompatible with your current board which runs on [STM32]…View in hardware catalog use a dynamic IP , ie , the card will plug into several different networks , after getting an IP it will start to send data via GET PHP.

I decided to change to ATmega328ATmega328Microcontrollers and processors…al port without resetting, the 16u2 send a pulse of about 4 us to the RX port of the Atmega328 . This pulse can be interpreted as a characher that depends on baudrate A 256000 you…View in hardware catalog STM32F103STM32F103Microcontrollers and processors…19.html . ag123 Sat Apr 28, 2018 5:54 pm come to think of it blue pill / maple mini ( stm32f103 ) is an *ideal* keyboard controller, the scanning can be done with assistance of sh…View in hardware catalog for memory reasons.

and so I am new to the world of CORTEX – M3

Thu Sep 01, 2016 9:01 pm

I tried your code, and what I got was: using Serial, it worked, but using Serial1 (and the correct pins of course), it only got to [getDHCPandDNS], and then stopped (probably inside ether.begin(…)).

So maybe try Serial with A9/A10 pins.

Fri Sep 02, 2016 10:46 am

Good Morning,
I use Serial1 because I’m using the ST -LINK V2 cable and use one card arduino in Serial1 to communicate send the data in the serial monitor .

Using the ST -LINK V2 cable and look at the serial monitor ?

Fri Sep 02, 2016 1:35 pm

I connected the micro USB cable to the mini MapleMapleDevelopment and computing boards…expensive short of buying in bulk. many resort to usb-serial converters. today comes leaflabs maple , stm32duino it is ‘disruptive’ in a similar light, user customizable usb is no…View in hardware catalog plate , now I’m using serial and no more Serial1 , and carrying scketch with ST -LINK V2 cable and IDE arduino 1.6.3 , bad even then the Ethernet network does not work.

Upload to RTCclock and led PC13 blink and everything works normally.

#include <RTClock.h>
RTClock rt (RTCSEL_LSE); // initialise
uint32 tt;
#define LED_PIN PC13
// This function is called in the attachSecondsInterrpt
void blink ()
{
digitalWrite(LED_PIN,!digitalRead(LED_PIN));
}
void setup()
{
pinMode(LED_PIN, OUTPUT);
rt.attachSecondsInterrupt(blink);// Call blink
}
void loop()
{
if (rt.getTime()!=tt)
{
tt = rt.getTime();
Serial.print("time is: ");
Serial.println(tt);
}
}

Fri Sep 02, 2016 2:00 pm

Looking for Maple MiniMaple MiniDevelopment and computing boards…8MHz petertumler Thu Sep 24, 2015 10:58 am Hi, I’m trying to underclock a STM32F103 ( Maple Mini ) to 48MHz (for energy efficiency reasons). According to the datasheet .. The full…View in hardware catalog board , when I upload the scketch of UIP_ethernet or serasidis_ethernet_stm , the serial does not work , but when I upload the scketch blink led normally works the serial .

what could it be?

Mon Sep 05, 2016 1:05 pm

@ weslleymata
Sorry for the delay but I was very busy (as most of us) during the last months.
I saw the example code you posted and it works ok, at least on my STM32F103C8T6STM32F103C8T6Microcontrollers and processors…e Sep 27, 2016 10:28 pm I know this is an old topic, but… I’m using blue pill board ( STM32F103C8T6 , version 3). With the current (modified) Adafruit library 0.96″ OLED display w…View in hardware catalog and ENC28J60ENC28J60Communications, navigation, interfaces and RFID… have some compatibility issues with some routers so looks like I have to swap it to ENC28J60 . xebbmw Tue Sep 12, 2017 10:13 am [alce – Mon Sep 11, 2017 11:19 pm] – I have not pu…View in hardware catalog ethernet module.

Arduino IDE: 1.6.5
Libray: Ethercard_STM

Serial terminal snapshot
My IP: 192.168.1.9
GW IP: 192.168.1.1
DNS IP: 192.168.1.1
Server: 62.1.38.163

>>> REQ
<<< reply 86 ms
HTTP/1.0 404 Not Found
Content-Type: text/html; charset=UTF-8
Content-Length: 1568
Date: Mon, 05 Sep 2016 12:19:19 GMT

<!DOCTYPE html>
<html lang=en>
<meta charset=utf-8>
<meta name=viewport content=”initial-scale=1, minimum-scale=1, width=device-width”>
<title>Error 404 (Not Found)!!1</title>
<style>
*{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7% auto 0;max-width:390px;min-height:180px;padding:30px 0 15px}* > body

…

The only thing I need to notice is that by default the Chip Select (CS) pin is the PA8. If you want to use any other pin you have to declare it to the ether.begin line.

PA8 is used as Chip Select pin (default setting)
if (ether.begin(sizeof Ethernet::buffer, mymac) == 0)

Fri Sep 09, 2016 7:23 pm

Hi Vassilis ,
I tested in my house and this normal functioning , thank you.

Another question , the crystal is on the board is 8MHZ but works in 8MHZ or 72MHz ?

Another question , I’m using a dynamic IP , it will be used in several different types of networks , poor have any networks that does not work , even turning off the firewall network ETH ENC28J60ENC28J60Communications, navigation, interfaces and RFID… have some compatibility issues with some routers so looks like I have to swap it to ENC28J60 . xebbmw Tue Sep 12, 2017 10:13 am [alce – Mon Sep 11, 2017 11:19 pm] – I have not pu…View in hardware catalog card can not connect to the internet.

Thanks for everything .

Fri Sep 09, 2016 8:31 pm

There is a clock multplier on the clock frequency inside the STM32STM32Microcontrollers and processors…Map magic glue code, ethernet compiles, just WARNING: library LwIP claims to run on [ stm32 ] architecture(s) and may be incompatible with your current board which runs on [STM32]…View in hardware catalog .
( It is set to 9 times multiplication, hence 72mhz which is the normal clock freq for this device)

Post a reply

Optional · up to 10 MiB