industrialNETworXnetx

M T

M T

Hilscher Gesellschaft für Systemautomation mbH

| 21.01.2008 | 08:33 | 0 replies

Note: Error sending frame

For all that are wondering where the Error sending frames output is coming from, when Debugging with KITL:

Sample Serial Output:

pDevice->pDriver......... 0x80b36510
KITL: *** Device Name ***
WARN: KITL will run in polling mode
Error sending Frame: 0x90010052
Error sending Frame: 0x90010052
Error sending Frame: 0x90010052

After starting the Debug Image the Ethernet Controller and PHY is Reset. During this time, no ethernet frames can be sent, as the LINK goes down.

Note: This is no error in the image/source.

The highest Nibble is one of the following error codes:

0x8 : Late Collision
0x9 : Link down during transmission
0xA : Collision
0xB : Invalid Frame length
0xC : Invalid Pointer
0xD : FIFO underflow

For custumers using the latest netX BSP V1.012 following patch can be applied to print the error codes/description:

SRC/BOOTLOADER/netXEthDbg/netXEthDbg.c

211a212,221
> static const char* s_aszConfirmationErrors[] =
> {
> "Late collision",
> "Link down during transmission",
> "Too many Collisions during send",
> "Invalid Length given (must be >60 Bytes)",
> "Illegal Pointer for DMA passed",
> "Fifo Underflow (internal XC Error)"
> };
>
244c254,262
< EdbgOutputDebugString ("Error sending Frame: 0x%X\r\n", tPointer.uiVal);
---
> unsigned int uiErrorCode = tPointer.tBf.uiError & 0x7;
> if( uiErrorCode < sizeof(s_aszConfirmationErrors) / sizeof(s_aszConfirmationErrors[0]))
> {
> EdbgOutputDebugString ("Error sending Frame: 0x%X (%s) \r\n", tPointer.uiVal, s_aszConfirmationErrors[uiErrorCode]);
> } else
> {
> // this should never happen
> EdbgOutputDebugString ("Error sending Frame: 0x%X (unknown error code %X) \r\n", tPointer.uiVal, tPointer.tBf.uiError);
> }

Regards

MT

Login