Hi all
I'm using Teensy 3.6 as a bridge between ethernet and uart devices. I'm using the Wiz820 Ethernet module with teensy 3.6 on a breadboard for a prototype (no Wiz820_sd adaptor)
I've connected the Wiz820 MISO/MOSI/SS/CLK/RST/VIN/GND just as shown in
https://www.pjrc.com/store/wiz820_sd_adaptor.html
and I'm using Ethernet library to communicate using UDP protocol.
Also I'm using Serial1 at 1500kbps to communicate with the UART device, and the USB serial (serial object) for printing debugging and profiling data.
The software and protocol decoding/translation/bridging have been well debugged and tested previously and is working properly on Arduino with Ethernet2 shield, with the exception of using Ethernet2 instead of Ethernet library and using serial2 instead of serial1, that's all!
Now as I need more processing power I've switched to Teensy 3.6 running at 168MHz
Finally, the problem is as follows: Things are find with only one device (ethernet side or uart side) is sending alone, but the moment that both end devices start sending simultaneously, teensy resets on its own
I tried powering Wiz820 using an external power supply to eliminate the case of power shortage, but nothing changed, I noted it is drawing around 176 mA.
The code is rather big to describe the issue, so I'll start with this description then post some cleaned up and focused section when needed. However, the relevant part of setup() is simply:
Some additional notes that might help (or confuse) the reader are:
1- Teensy hangs and doesn't function when started while the UART data is already being received.
2- When teensy resets itself due to the problem described above, it won't receive the serial or udp data until all communicating devices are stopped and teensy is reset manually again
3- I have some profiling code in my program, the average cummulative time spent to read uart data (at my application startup) is about 6-8 msec every second. Sometimes this number goes up to 928 msec/sec with the same data being transmitted and never goes normal until teensy is restarted again.
Am I doing something obviously wrong, such as using the Wiz820 w/o adapter or mixing libraries that won't work together? or am I missing something to be done over the Arduino working code?
Cheers
MTA
I'm using Teensy 3.6 as a bridge between ethernet and uart devices. I'm using the Wiz820 Ethernet module with teensy 3.6 on a breadboard for a prototype (no Wiz820_sd adaptor)
I've connected the Wiz820 MISO/MOSI/SS/CLK/RST/VIN/GND just as shown in
https://www.pjrc.com/store/wiz820_sd_adaptor.html
and I'm using Ethernet library to communicate using UDP protocol.
Also I'm using Serial1 at 1500kbps to communicate with the UART device, and the USB serial (serial object) for printing debugging and profiling data.
The software and protocol decoding/translation/bridging have been well debugged and tested previously and is working properly on Arduino with Ethernet2 shield, with the exception of using Ethernet2 instead of Ethernet library and using serial2 instead of serial1, that's all!
Now as I need more processing power I've switched to Teensy 3.6 running at 168MHz
Finally, the problem is as follows: Things are find with only one device (ethernet side or uart side) is sending alone, but the moment that both end devices start sending simultaneously, teensy resets on its own
I tried powering Wiz820 using an external power supply to eliminate the case of power shortage, but nothing changed, I noted it is drawing around 176 mA.
The code is rather big to describe the issue, so I'll start with this description then post some cleaned up and focused section when needed. However, the relevant part of setup() is simply:
Code:
// for printf debugging
Serial.begin(250000);
// for communication
Serial1.begin(1500000);
// start the Ethernet and UDP:
Ethernet.begin(mac, ip);
Udp.begin(listen_port);
Some additional notes that might help (or confuse) the reader are:
1- Teensy hangs and doesn't function when started while the UART data is already being received.
2- When teensy resets itself due to the problem described above, it won't receive the serial or udp data until all communicating devices are stopped and teensy is reset manually again
3- I have some profiling code in my program, the average cummulative time spent to read uart data (at my application startup) is about 6-8 msec every second. Sometimes this number goes up to 928 msec/sec with the same data being transmitted and never goes normal until teensy is restarted again.
Am I doing something obviously wrong, such as using the Wiz820 w/o adapter or mixing libraries that won't work together? or am I missing something to be done over the Arduino working code?
Cheers
MTA