• AVR Freaks

KSZ9897S and MMD registers (SPI interface)

Author
ksv198
New Member
  • Total Posts : 2
  • Reward points : 0
  • Joined: 2019/06/19 01:55:21
  • Location: 0
  • Status: offline
2019/06/25 00:16:50 (permalink)
0

KSZ9897S and MMD registers (SPI interface)

Hi, All!
I'm working with KSZ9897S chip using SPI interface. 
Reading and write global registers is fine, reading and write SGMII registers (indirect) is fine too.
But I'm have a trouble with MMD (indirect) registers.
I set the PHY MMD Setup Register (as on p.166 of datasheet, Device Address 7h, Reg. 3Ch ) and PHY MMD Data Register (Reg. 3Ch). Then i try read PHY MMD Data Register, hoping reicive value 0x0006 from MMD register 3Ch, but I receiv 3Ch...
What I'm doing wrong?
#1

3 Replies Related Threads

    ZdenekZ
    New Member
    • Total Posts : 3
    • Reward points : 0
    • Joined: 2017/07/27 22:35:19
    • Location: 0
    • Status: offline
    Re: KSZ9897S and MMD registers (SPI interface) 2019/07/11 01:22:55 (permalink)
    0
    Hi,
    I have the same trouble, have you any suggestion, how to fix it ?
    Regards Zdenek
    #2
    ksv198
    New Member
    • Total Posts : 2
    • Reward points : 0
    • Joined: 2019/06/19 01:55:21
    • Location: 0
    • Status: offline
    Re: KSZ9897S and MMD registers (SPI interface) 2019/07/11 02:32:35 (permalink)
    4 (1)
    Hello!
     
    ZdenekZ
    I have the same trouble, have you any suggestion, how to fix it ?
    Regards Zdenek



    I'm decid this problem. All indirect registers (MMD and SGMII) you need writing in 16 bit mode. 
    If you look in datasheet on page 54 (figure 4-10), you'll see byte oriented write procedure. But 16-bit registers (only indirect!) MUST be write in 16-bit rejim. Simple continue write next byte data after first (do not forget byte ordering - MSB first). For example:
    SCS_N-low {010 A23...A0 XXXXX D15...D8 D7...D0} SCS_N-high
    Good luck!
    #3
    ZdenekZ
    New Member
    • Total Posts : 3
    • Reward points : 0
    • Joined: 2017/07/27 22:35:19
    • Location: 0
    • Status: offline
    Re: KSZ9897S and MMD registers (SPI interface) 2019/07/11 03:01:33 (permalink)
    0
    Yes, Now I see, that access to this register must be strictly 16-bit.
    Many thanks for the prompt reply !
    Regards Zdenek
    #4
    Jump to:
    © 2019 APG vNext Commercial Version 4.5