FAQ
Frequently Answered Questions
(Häufig beantwortete Fragen)
Größtenteils noch nicht ins deutsche übersetzt.
Diese Seite wird demnächst gelöscht. Die aktuelle Version
befindet sich jetzt (leider nur in englischer Sprache) im
NutWiki.
1. Einführung und allgemeine Informationen
Was ist Ethernut?
Wo fange ich an?
2. Boards und Bauteile
Woher bekomme ich ein Ethernut Board?
Warum ist Ethernut so teuer?
Soll ich die Bauteile kaufen und das Board selbst bauen?
Kann ich die Platine selber herstellen?
Gibt es die CAD Dateien auch für Protel, Orcad, XYZ?
Kann ich den ATmega 103 auf meinem alten Board gegen einen ATmega 128 austauschen?
Warum wird ein 14,7456 MHz Quarz verwendet?
Kann ich die CPU übertakten?
Viele 8-bit Systeme nutzen den CS8900. Warum wurde für Ethernut der Realtek ausgewählt?
Wird ein 100 MBit Ethernet Controller unterstützt?
Benötigen C7 und C8 tatsächlich eine Isolationsspannung von 1 kV?
Wieviel RAM ist verfügbar?
Kann ich zusätzliches RAM hinzufügen?
Gibt es Ethernuts für den industriellen Temperaturbereich?
3. In-System-Programming
Was ist eigentlich In-System-Programming?
Why does my application stops working after its code became larger?
Which programming software is the best?
Which programming hardware is the best?
Why does program uploading suddenly stops working?
Why didn't Alastair's instructions solve my problem?
Can I use Atmel's STK500 Kit to burn Ethernuts?
The ATmega 128 supports self programming. Do you provide a boot loader?
4. Ethernut Applikationen
Are there any sample applications available?
Any application using the analog inputs?
What about MP3 applications?
5. Nut/OS Features
Anyway, I don't like your OS. Any alternatives?
6. Nut/Net Features
Does it support PPP or Slip?
I understood, that Ethernut supports TCP. What else?
Any secure protocol support like SSL?
Does it support routing?
Do the hardware drivers use a polling method or are they interrupt driven?
What is the maximum Ethernet transfer rate?
How were these transfer rates tested?
7. Ethernut Programmierung
What level of programming knowledge is required to write my own programs for the Ethernut board?
Which compilers are supported?
Can I use C++ with Ethernut?
My program doesn't work after upgrading Nut/OS. What to do?
I need to talk to a high speed interface. Will the OS interfere my I/O process?
I found a bug. Where to report?
8. Lizensierung
Did I get this right? Can I copy Ethernut for commercial products without paying royality?
If it's free, who is maintaining the code?
I want to use the design in a commercial application and
need reliable support. Isn't it too risky to rely on open source without warranty?
Can I use the Ethernut logo and product name for selling my own product?
Can I add my changes to software and hardware?
1. Einführung und allgemeine Informationen
Q: Was ist Ethernut?
A: Ethernut (ausgesprochen I:th:ernatt] mit englischem :th:) ist der Name
eines Open Source Hardware und Software Projekts zum Bau von
Embedded Ethernet Systemen. Der Hardware Teil ist ein kleines Board, das ebenfalls
den Namen Ethernut trägt.
Q: Wo fange ich an?
A: Zunächst benötigt man die Hardware. Das Hardware Design ist zwar
kostenlos, aber die Hardware selbst kostet üblicherweise Geld.Professionellen
Entwicklern empfehlen wir den Kauf des
Ethernut Starter Kits von
egnite direkt oder
einem der
Distributoren.
Das Kit ist auch dann eine gute Wahl, wenn man wenig oder keine Übung im
Löten von Fine Pitch SMD Bauteilen hat.
Als preiswerte Alternative bietet egnite die Leerplatine zum Kauf an.
Außerdem stehen die Eagle CAD Dateien im Download Bereich zur Verfügung.
Die Software für das Ethernut Board findet man ebenfalls im Download
Bereich. Allerdings sollte man zuerst die Entscheidung für einen der
beiden unterstützten Entwicklungsumgebungen treffen. Der kommerzielle
Compiler ICCAVR von ImageCraft wird mit einer integrierten Entwicklungsumgebung
(IDE) für Windows geliefert und von vielen professionellen Entwicklern
bevorzugt. Der GNU Compiler AVR-GCC ist für Linux und Windows frei
erhältlich.
Für einen ersten Einstieg sind aber auch die fertig übersetzten Binärdateien
aller Beispielanwendungen im Nut/OS Archiv enthalten.
Deutschsprachige Anwender sollten bedenken, dass die gesamte Dokumentation
mit wenigen Ausnahmen nur in englisch vorliegt.
2. Boards und Bauteile
Q: Woher bekomme ich Ethernut Board?
A: Die egnite GmbH in
Deutschland verteibt die Boards in fast alle Länder der Welt komplett bestückt und
getestet. Es gibt außerdem eine Liste von
internationalen Distributoren.
Q: Warum ist Ethernut so teuer?
A: Ist es nicht, es ist preiswert!
Ernsthaft, wenn man über Open Source Software oder gar Open Source Hardware
spricht, sollten kommerzielle Überlegungen nicht unter den Tisch fallen.
Als wir mit der Produktion der Boards im Jahr 2001 begannen, war das
Projekt reine Geldverbrennung. In der Zwischenzeit wurde es aber so
erfolgreich, dass das Produkt bereits einen merklichen Beitrag am
Gewinn des Unternehmens hat.
Während der vergangenen Jahre tauchten mehrere Konkurrenzprodukte auf,
die deutlich preiswerter sind.
Einige davon bieten niedrige Preise bei kleinen Stückzahlen, sind aber
nicht viel preiswerter bei größeren Bestellungen. Die Preise von Ethernut
wurden möglichst auf der Basis tatsächlicher Kosten kalkuliert und fallen
bei höheren Stückzahlen erheblich niedriger aus.
Ethernuts werden in Stückzahlen von wenigen Hundert produziert, während
größere Firmen ihre Produkte in einigen tausend Stück herstellen. Da die
Initialkosten einer solchen Produktion sehr hoch sind, ist die Herstellung
kleiner Mengen besonders teuer.
Ethernuts werden aus zwei Gründen ausschließlich in Deutschland produziert.
Zum einen macht es wenig Sinn, die Produktion von kleinen Stückzahlen
über den halben Globus zu verteilen. Zum anderen wäre es relativ aufwändig,
die Einhaltung der Umweltauflagen in weit entfernten Ländern zu
überprüfen. Natürlich sind wir uns auch darüber im Klaren, dass die
verwendeten Komponenten sehr wohl auf der ganzen Welt produziert werden.
Q: Soll ich die Bauteile kaufen und das Board selbst bauen?
A: That depends on your experience. Specially the fine pitch SMD parts are not
intended for unexperienced people. You should be sure that you can assemble it.
Most parts should be available from your local distributor. Bare PCBs and hard to get
parts can be ordered from egnite,
Q: Kann ich die Platine selber herstellen?
A: Probably not the same board in low quantities for a low price. The PCB has
4 layers with solder mask, hot air leveling finish and component print. Each has been
electrically tested against the Gerber data. However, it is possible, to create a 2 layer PCB
from the schematics, which may be cheaper. If you want to do that or if you need a
specific layout or different board dimensions, then you can download the original
CAD files from the download area. The layout
has been done with Eagle 4.0 from CadSoft.
This software had been choosen because it is relatively cheap and easy to use.
CadSoft supports Windows and Linux and offers a limited freeware version as well
as a low cost, non profit version.
Q: Are there any CAD files for Protel, Orcad, XYZ?
A: None that we know of. We would welcome converted formats, though.
Q: Can I replace the ATmega 103 on my old Ethernut by an ATmega 128?
A: Yes, and you can also replace the 3.6864 MHz crystal with 14.7456 MHz.
Q: Why do you use a 14.7456 MHz crystal?
A: Baudrates for the serial ports depend on the CPU crystal. For the
16 MHz ATmega 128, 14.7456 MHz is the optimal crystal frequency to allow
most standard baudrates. For the 6 MHz ATmega 103, 3.6864 MHz is the frequency of choice.
If you don't need standard baudrates, you can change the crystal to the maximum CPU
frequency.
Q: Can I overclock the CPU?
A: We won't do that, but it has been reported, that the 6 MHz ATmega 103 had been
successfully driven by a 11 MHz crystal on the Ethernut board. No overclocked ATmega 128
had been reported so far.
Q: Is the Ethernet Controller attached to the CPU address and data bus?
A: Yes, in order to provide maximum performance the Ethernet Controller
is connected to the address and data bus.
Q: How much address space is used by the RTL8019AS?
A: The Realtek controller has an on-chip address decoder. On
the Ethernut board it occupies addresses 8300 through 831F hex.
Q: Many other 8-bit systems use the CS8900. Why did you select the Realtek chip?
A: In the early design stage we've been told, that the Crystal chip can't handle
interrupts reliable in 8-bit mode. So the sample, which had been kindly provided by Crystal
never made it on a board. We are not able to confirm the above statement,
but we have to learn, that the Realtek has some flaws. For a long time Ethernuts crashed
under heavy traffic. Luckily we were able to solve these problems by software.
Back to the CS8900. It is working fine in polled mode, but when running in 8 bit mode,
the chip suddenly stops generating interrupts. This could be provoked by ping flooding
the controller. Using a hybrid method looks like a reliable solution. That means, that
the driver will use interrupts and additionally poll the device in timed intervals.
When the chip stops generating interrupts, the next poll will reenable them.
Jon Anders Haugum reported, that this worked excellent on another embedded system.
Mike Cornelius contributed a polling CS8900 Ethernut driver, which has been
recently added to the distribution.
Q: Is there any 100 Mbps Ethernet Controller supported?
A: Yes, on Ethernut 2 boards you will find a LAN91C111 from SMSC. This
device supports 10 and 100 Mbps Ethernet.
Q: Do capacitors C7 and C8 really need an isolation of 1 kV?
A: That depends on the environment where Ethernut is installed. In
your office near the PC you may even run the board without these
capacitors. But the difference of electrical potentials might become
very high with long twisted pair cables in industrial environments.
If running in less electrically noisy office areas, 500 volts may
provide sufficient isolation.
Q: How much RAM space is available?
A: Ethernut boards with an ATmega 103 CPU provide 32672 bytes of RAM,
while boards equipped with an ATmega 128 CPU provide 32512 bytes only. In
order to have a simple address decoder, the lower RAM addresses of the
external RAM are overlaid by the on-chip RAM and CPU registers. In other
words, the lower 4096 bytes of external SRAM on the ATmega 103 board and
the lower 4352 bytes on the ATmega 128 board are not used.
Q: Can I add addtional SRAM?
A: Yes, but this requires some hardware changes for the address
decoder. A board with 128 kByte SRAM on two pages is on the todo list.
Q: Are Ethernuts available for industrial temperature ranges?
A: Not Ethernut 1.3, because the Realtek Controller doesn't support
this. Fortunately a special Ethernut 2 version will be available for extended
temperature ranges.
3. In-System-Programming
Q: What is In-System-Programming anyway?
A: In the dark ages, when microcontrollers appeared on our planet
for the first time, they often used EPROMs for their non-volatile memory.
These erasable programmable read only memories got a tiny window, which
was used to erase the contents by exposing the chip to an UV lamp. Sure
it would have been possible doing it In-System. However, programming these
chips required exotic voltages and timings, which were typically not
available on the target boards. They are removed from the target board,
put into an UV eraser for a few minutes and then put into a special
programmer for reloading a new contents.
Today's flash based memories need not to be removed for reprogramming.
Many modern microcontrollers, like the ATmega128 used on the Ethernut Board,
can even reprogram themselves. The flash memory is divided into an application
and a boot loader area, both of which can update each other.
You may now ask yourself, if the Ethernut would be able to reprogram
itself over the Ethernet or RS232 interface. Sure, this is supported.
More information is given below.
Q: Why does my application stops working after its code became larger
than 64k bytes?
A: Some time ago we found out, that almost any programming software
provided a version, which failed to program the upper 64k of the ATmega flash.
Make sure, you got the latest version of your software.
If you are using ICCAVR, note, that programs larger than 64k bytes require the
professional version of the compiler.
AVRGCC automatically puts program memory data before the code, but all program
memory data must fit in the lower 64k.
Q: Which programming software is the best?
A: No idea, there are too many.
We prefer uisp with AVR-GCC. This had been working fine with the parallel
port dongle, but the Windows version failed with the serial port dongle.
Fortunately this problem disappeared in the latest versions.
ICCAVR has a build-in programmer, which worked great with the parallel and
the serrial port dongle. Internally the IDE called stk500.exe, which is part
of the AVR Studio package. Unfortunately, starting with version 6.29, ImageCraft
implemented its own programming software, which failed to work with our serial
port dongle. One temporarely solution is to use AVR Studio.
Q: Which programming hardware is the best?
A: Again no idea.
The Ethernut Starter Kit has been initially shipped with a STK200 compatible
adapter, which provides the cheapest solution. But it's connected to the PC's
parallel port, which sometimes introduces problems.
In 2003 we switched to the STK500 compatible adapter, which is connected
to the PC's serial port. Although in the same housing, it can be easily
recognized by it's yellow LED.
Atmel's own product, the ATJTAGICE, may look expensive, but is worth the money.
Programming over JTAG is much faster than the STK200 conterpart and you
get an In-Circuit Emulator for free. :-) Remember, that the ATmega103 doesn't
provide a JTAG interface. The original Ethernut design was based on this chip
and doesn't provide a JTAG connector. Typically the ATJTAGICE comes with a
tiny adapter, which can be used to connect it to the Ethernut. More information
is available here.
Q: Why does program uploading suddenly stops working?
A: This happened and still happens to many users. It's not a
specific Ethernut problem, but related to the ATmega128. Several
fuse settings are available to make the CPU stop working.
Never ever fiddle around with fuse settings unless you know what
you do. Also make sure, that the programming software and hardware
you are using is reliable.
In most cases users misprogram the oscillator option fuses and the
CPU clock stops. Without CPU clock the ISP is disabled too. One
solution is using the ATJTAGICE to properly set the fuses. If you
do not own this device, there's still a way out of this desaster,
thanks to Alastair Jeremy. We specially like his idea of always
buying two boards :-). Seriously, you can use any kind of clock
source, despite Alastair's advice, people reported, that a few
kHz are sufficient.
To assist those people who might blow up an ethernut in the future,
here is how I fixed it:
1. Make sure you have a second Ethernut which you haven't killed yet
(or any other clock source)
2. If you have a signal generator, then I presume that you could use
it to make a 5V square wave at a fairly high frequency, so then you
don't need to use the Ethernut.
3. Make an Ethernut program that toggles a port pin quite fast.
See below for mine.
4. Program this program into the working ethernut
5. Connect GND of both ethernut boards
6. Connect power supply inputs (unregulated) of both boards, make
sure that the polarity is the same for both boards, (yes, even though
it is on the input side of the recitfication diodes)
7. Connect a port pin (I used one from port D) from the 'working'
Ethernut to the XTAL1 pad of the non-working ethernut
8. Connect the programming cable to the 'dead' ethernut.
9. Power up! (This should power up both boards at the same time)
10. Program the fuse bits back to normal. If you can't read the fuse
bits or write to them then there must be some other problem. I used PonyProg
(the same thing I used to kill it ;).
11. Power off. Remove all interconnections. Now the board should work
as per normal. Just remember to avoid destroying those fuse bits!!
Essentially the second ethernut is being used to generate a square wave.
So a signal generator could be used instead of course. This is why I always
buy two units of something that I am going to 'play' with. One to use, and
one to pull out when I break the first one :)
Q: Why didn't Alastair's instructions solve my problem?
A: There are many possibilities to kill your Ethernut.
One of it is the simple wear out of the flash memory. Many people
aren't aware, that flash memory has a limited number of erase/write
cycles. The ATmega datasheet guarantees an endurance of 1000 cycles,
which surely makes some people panic now.
In reality I wear out one single ATmega103 based board. One university
reported the same problem (students, you know what I mean :-)), but we are
still waiting for their board being returned. Inofficial voices reported,
that, after Atmel switched the production process for the ATmega128,
10,000 cycles should be no problem.
Another possibility is to completely misprogram the fuses, so not
even an external clock will help. To do this, you need an ATJTAGICE.
It will enable you to disable both serial programming methods, the
ISP interface and the JTAG interface. There's still the possibility
to use the parallel programming mode, but we do not have any idea
how to do this with an Ethernut Board. In such a case we replace
the ATmega128. If you feel lost, talk to us and we will try to help you.
Btw., do not mix up parallel programming mode with parallel programming
ISP dongle. ISP and JTAG use serial mode programming (see the ATmega128
datasheet). ISP programming adapters for serial mode programming are
available for the PC parallel or serial port, nowadays even for USB
or Ethernet.
Q: Can I use Atmel's STK500 Kit to burn Ethernuts?
A: We thought yes, but William D. Carroll wrote:
"For the STK500 the 10-Pin ISP socket does not work as expected.
Your circuit uses pin 3 on the ISP to control the 4053 and select
either the ISP socket or the RS232 interface. Pin 3 on the STK500
is a NC pin and therefore carries no signal. To get around this here
is what I did using the supplied 2-pin cable in the STk500 Kit connect
ISP Pins 1-2,5-6,7-8 and 9-10 to EtherNut ISP Pins 1-2,5-6,7-8 and 9-10
and place a jumper on the ethernut ISP between pins 2-3 this will allow
you to program and verify and read the ATMega103."
On newer Ethernuts with version 1.3 you will find a jumper near the
ISP interface. You can use a one to one flat cable and close this
jumper.
Q: The ATmega 128 supports self programming. Do you provide a boot loader?
A: Yes, a TFTP based bootloader with DHCP support
is available in the download area.
Recently another boot loader had been published, which supports
the XMODEM protocol over RS232.
4. Ethernut Applications
Q: Are there any sample applications available?
A: Currently only simple examples are included to demonstrate
some of the features. Although simple, they include a Webserver with
CGI support or a RS-232 server, which can route serial input and
output between the on-board UART and a telnet client.
Q: Any application using the analog inputs?
A: Not yet.
Q: What about MP3 applications?
A: A driver for the VS1001K MP3 decoder is included.
5. Nut/OS Features
Q: Anyway, I don't like your OS. Any alternatives?
A: At least one company we know of uses the commercial RTOS
offered by CMX.
Adam Dunkels ported the Contiki Operating System to the Ethernut hardware.
6. Nut/Net Features
Q: Does it support PPP or Slip?
A: Nut/OS supports PPP, but not SLIP.
Q: I understood, that Ethernut supports TCP. What else?
A: The following base protocols are supported: ARP, IP, ICMP,
UDP and TCP. In addition the higher level protocols DHCP and HTTPD
are included.
Q: Any secure protocol support like SSL?
A: No.
Q: Does it support routing?
A: Yes, the TCP stack supports host, net and default routing.
Q: Do the hardware drivers use a polling method or are
they interrupt driven?
A: The Ethernet driver for the Realtek and the SMSC chip as well
as the UART driver are fully interrupt driven. The Ethernet driver for
the Crystal chip uses polling.
Q: What is the maximum Ethernet transfer rate?
A: The 14.7456 MHz ATmega 128 board reaches 256 kByte and the
3.6864 Mhz ATmega 103 about 50 kByte per second.
Q: How were these transfer rates tested?
A: The test uses a simple (telnet like) transfer between
an Ethernut Board and a Windows NT PC, connected via an Ethernet switch.
8 Mbytes of data were transfered in one direction first, then the
same amount of data was transfered back.
7. Ethernut Programming
Q: What level of programming knowledge is required to write
my own programs for the Ethernut board?
A: Your C experience shouldn't let you stumble over structure types
with pointers to pointers. But the provided samples can be used as
templates for own developments. Some experience with socket and
multithreaded programming will be an advantage. If you want to
change or enhance the Nut/OS code, you probably need some low level
programming experience including assembler programming.
Q: Which compilers are supported?
A: The current version of Nut/OS requires AVRGCC version 3.2
or ImageCraft ICCAVR 6.28. Later versions may or may not work.
Q: Can I use C++ with Ethernut?
A: We never tried, but it may work using AVRGCC. Files with
extension .cc or .cpp will be automatically compiled by the C++ compiler.
But note, that libstdc++ is not available and you must add compiler option
-fno-exceptions.
Q: My program doesn't work after upgrading Nut/OS. What to do?
A: Check the history page in the Nut API documentation for
changes, that may break your application. However, most often the
problem is on the compiler side. Go to the installation directory and
type make clean followed by make install to rebuild
the libraries with your compiler version. Then rebuild your application.
Q: I need to talk to a high speed interface. Will the OS interfere my I/O process?
A: Neither Nut/OS nor the TCP/IP stack depend on any
background process. Use NutEnterCritical and NutExitCritical to
disable and resp. to re-enable all interrupts. Between these two
Statements the CPU is completely your's. About 6 kByte of incoming
Ethernet frames can be stored in the Ethernet controller without CPU
intervention. Of course, if your application stays for a too long time
in the critical section, you may lose incoming Ethernet frames or
UART characters.
Q: I found a bug. Where to report?
A: Please fill out the form at
Sourceforge.
8. Licensing
Q: Did I get this right? Can I copy Ethernut for commercial
products without paying royality?
A: Yes. Schematics and board layout may be used
in private or commercial products without paying any fee. Although
many parts of the software had been taken from other projects, they
can be used without paying royality fee and may be re-distributed
in binary form with or without source code. But note, that you are not
allowed to remove any copyright notices. You must present the
copyright notice also in your documentation. Not doing so is at least unfair.
Q: If it's free, who is maintaining the code?
A: The code is maintained by
egnite Software GmbH. The company
sells custom applications based on the Ethernut design and believes in
the Open Source Movement. But carefully note, that the software is
provided without any warranties.
Q: I want to use the design in a commercial application and
need reliable support. Isn't it too risky to rely on open source without
warranty?
A: This topic can't be discussed here in full detail. Just one thought:
Unlike PC software, the lifetime of embedded system software is measured in
decades, not years. Our point is, that well written and documented source code
in a widely used standard language is the best choice. Opinions differ, however.
Q: Can I use the Ethernut logo and product name for selling my own product?
A: No, Ethernut is a registered trademark. You are welcome
to refer to the Ethernut design, but you can't sell it under that
name.
Q: Can I add my changes to software and hardware?
A: Yes, you can. And, unlike other licensing schemes, the Ethernut
copyright doesn't require to publish your changed sources. However,
the Ethernut community would appreciate it very much, if you do.