User`s guide

www.uTasker.com
µ
Tasker – AT91SAM7X Tutorial
V1.4
uTaskerV1.4_SAM7X.doc/0.03 33/36 31.07.2009
If you continue to step through the routine you will see that the IP frame is interpreted to see
whether we are being addressed, it may cause our ARP cache to be updated and the check
sum of the IP frame will also be verified. To return without stepping all the way you can use
SHIFT F11 to return to the ETHERNET task code, where the protocol type is checked.
E. ICMP Handling
Note that each protocol type can be individually activated or deactivated in config.h. ICMP
frames are only handled when the define USE_ICMP is set. If your project doesn’t want to
support ICMP then it can be simply removed…
Step into the ICMP routine (fnHandleICP()) by using F11. You will see that there is also a
checksum in the ICMP field which is verified and the structure ptrICP_frame allows the
ICMP fields to be comfortable viewed in the watch window.
Our frame should be of type ECHO_PING, which can also be individually deactivated in your
project if you want to support ICMP but do not want the ping test to be replied to.
The received frame is sent back, after modifying a few fields, using the call fnSendIP(). I
don’t want to go into details about how the IP frame is constructed – you can see this in
detail by stepping into the routine and observing what happens – but I should mention how
the frame is sent out over the Ethernet since this is again a low level part which uses the
SAM7X registers again. Very briefly you should understand that the SAM7X has been set up
with one transmission buffer into which the data is copied. The data is set up to respect the
ICMP, IP and Ethernet layers as we observed in the received message and, once completely
ready, the transmission is activated.