Hello,
I am trying to perform cable diagnostics for a CAT5e ethernet cable plugged into a TLK110CUSEV development board's RJ-45 jack, using the TLK110's internal mechanisms, but with no success by now.
An ARM7 microcontroler is being used for the communication link ( MDC, MDIO ) with TLK110, which works fine and i have had success writing and reading back the standard and extended set registers as well.
The following code is what i have tried so far:
Transmit_S_Frame( OP_WRITE, "00001", BMCR, "0000000000000000" ); // Write 0x0000 to BMCR
TimeDelayMS( 50 );
Transmit_S_Frame( OP_READ, "00001", BMCR, NULL ); // Read the BMCR
TimeDelayMS( 50 );
Transmit_E_Frame( OP_WRITE, "00001", CDSCR, "0100111000000000" ); // Write 0x4E00 to CDSCR
TimeDelayMS( 50 );
Transmit_E_Frame( OP_READ, "00001", CDSCR, NULL ); // Reading back the CDSCR confirms what's been written previously.
TimeDelayMS( 50 );
Transmit_E_Frame( OP_WRITE, "00001", CDCR, "1000000000000000" ); // Write 0x8000 to CDCD to start the diagnostics
TimeDelayMS( 60000 ); // Allow 60 seconds for the diagnostics to be completed
Transmit_E_Frame( OP_READ, "00001", CDCR, NULL ); // Reading the CDCR at this point always returns 0x0000 - which means
// the diagnostic has not finished, nor there is error.
TimeDelayMS( 50 );
Transmit_E_Frame( OP_READ, "00001", CDLRR1, NULL ); // All the following registers contain 0x0000 ...
TimeDelayMS( 50 );
Transmit_E_Frame( OP_READ, "00001", CDLRR2, NULL );
TimeDelayMS( 50 );
Transmit_E_Frame( OP_READ, "00001", CDLRR3, NULL );
TimeDelayMS( 50 );
Transmit_E_Frame( OP_READ, "00001", CDLRR4, NULL );
TimeDelayMS( 50 );
Transmit_E_Frame( OP_READ, "00001", CDLRR5, NULL );
TimeDelayMS( 50 );
Transmit_E_Frame( OP_READ, "00001", CDGRR, NULL );
I could use some advice on what i am doing wrong or any idea i could try next. Thanks!
Darko