Hallo,
Habe hier ein Problem mit dem Ethernetchip von wiznet, dem W3100A. Also besser gesagt mit dem IIM7000A von elektronikladen.de. Dieser hängt an einem C167, Schaltung ist weitgehend vom Testboard von elektronikladen.de übernommen.
Ich habe den Beispielcode "W3100A interface test" von
Codeausschnitt sieht folgendermaßen aus:
---------------------------------------------------------------------- COMMAND(0) = 0x80; // Initialize W3100A
*GATEWAY_PTR = 172; // Set Gateway IP address *(GATEWAY_PTR+1) = 20; *(GATEWAY_PTR+2) = 0; *(GATEWAY_PTR+3) = 1;
*(SUBNET_MASK_PTR) = 255; // Set subnet mask *(SUBNET_MASK_PTR+1) = 255; *(SUBNET_MASK_PTR+2) = 0; *(SUBNET_MASK_PTR+3) = 0;
*SRC_HA_PTR = 0x00; // Set MAC Address *(SRC_HA_PTR+1)= 0x08; *(SRC_HA_PTR+2)= 0xDC; *(SRC_HA_PTR+3)= 0x00; *(SRC_HA_PTR+4)= 0x00; *(SRC_HA_PTR+5)= 0x00;
*SRC_IP_PTR = 172; // Set Source IP Address *(SRC_IP_PTR+1) = 20; *(SRC_IP_PTR+2) = 0; *(SRC_IP_PTR+3) = 39;
i = 0; PutStringLn("\r\nTEST 5. OCCURRENCE OF INTERRUPT."); COMMAND(0) = 0x01; while(!IsISROK )if(i++==0xFFFF) break; if(IsISROK) { if(INT_REG != 0) PutStringLn("\tInterrupt register is not cleared."); else PutStringLn("\tInterrupt register is cleared."); if(INT_STATUS(0) != 0) PutStringLn("\tInterrupt status register is not cleared."); else PutStringLn("\tInterrupt status register is cleared.");
PutStringLn("\r\nTEST 6. using dos-command prompt, pinging your target board"); } else { PutStringLn("Verify fail : Interrupt is not occurred."); }
-----------------------------------------------------------------------
Der INIT_OK Interrupt wird ausgelößt, in der ISR das Interrupt Status Register auch wieder gelöscht, wie gesagt lt. Datenblatt sollte der Ping ab jetzt funktionieren.
Adressen und Bustiming stimmt IMO alles, ich kann auch die IP, Mac usw. wieder auslesen - alles ohne Fehler. Ach ja, als Verbindung habe ich sowohl Cross-Kabel als auch Hub probiert, es geht beides nicht. Und bei Etheral sehe ich nur ausgehende Whois-Broadcasts, es kommt also wirklich nichts retour :-(
Für Hinweise wäre ich sehr dankbar. MfG, Johannes