I want to ask for any assistance anyone can provide me to read the mac address table for RTL8309SB.
This is the chip:
This is the chip datasheet:
This is how to read mac address from it's table:
1.Write PHYID = 0x0000h, Reg19.11 = 1 for enable “Lookup table accessible enable”
Example: PHIID = 0, Reg19 = 0xFFC1h (Default PHYID = 0 Reg19 = 0xF7C1h).
2. Read PHYID = 0x0007h, Reg.16, check the Reg16.1 = 0 to make sure it is in idle state, if Reg16.1 = 1 please re-do the step 2.
3. Write PHYID = 0x0007h, Reg.18 = 0bnnnn,nnnn,0000,00nn MAC table entry address. Reg.18[15:8] = address of MAC lookup table bit[7:0], Reg.18[1:0] = address of MAC lookup table bit [10:9]
4. Write PHYID = 0x0007h and Reg.16 = 0b1111,1111,1111,1111, to trigger a read command for RTL8309SB.
5. Read PHYID = 0x0007h, Reg.16, check the Reg16.1 = 0 to make sure the command is done, if Reg.16.1 = 1 please re-do the step 4 till the reg16.1 =0.
6. Read PHYID = 0x0007h Reg.17, Reg17.6 = 1 means this entry is static and will never be aged out.
7. Reg17[5:4] = 2-bit counter for internal aging.
8. Reg17[3:0] indicate the port number of this Source MAC address is learned.
9. Read PHYID = 0x007h Reg.20, Reg20[15:8] indicate Source MAC address[39:32] Reg20[7:0] indicate Source MAC address[47:40]
10. Read PHYID = 0x007h Reg.19, Reg19[15:8] indicate Source MAC address[23:16] Reg19[7:0] indicate Source MAC address[31:24]
11. Read PHYID = 0x007h Reg.18, Reg18[15:8] indicate Source MAC address[7:0] Reg18[7:0] indicate Source MAC address[15:8]
(this was given to me by engineer, who designed some switches with the chip)
I can't seem to follow up the guide. Can anyone assist me? It would be great to read switch's mac address table, so I can design a handheld device which can do that.
Thanks to any help in advance!