Macro definition problem in W5500 library function
Ethernet Chips
No replies yet. Be the first to reply.
Join the discussion.
Ethernet Chips
No replies yet. Be the first to reply.
Join the discussion.
Share projects and connect with makers.
Joined before the site update? first.
New to WIZnet Makers?
We sent a verification link to your address. Open it to activate your account, then log in.
Accounts from this email provider are reviewed by an administrator after verification. Approval usually takes one business day.
Already have an account?
Enter your email address. If it belongs to an account, we'll send a link to set a new password. Members who joined before the site update use this to set their password.
If an account uses that address, we sent a link to set a new password. The link works once and expires in 30 minutes.
Know your password?
Need an account?
RE: Macro definition problem in W5500 library function
by Eugeny ·
This must be preparation of the 3rd byte in the SPI transaction. 0x08 is the socket 0 register set. If you add channel (socket) number shifted left by 5 bits you will get 16-bit address + bank identification for respective channel (socket) ready to shift to the SPI. The only additionally needed is set bit for write and 2 bits for transfer mode type.
RE: RE: Macro definition problem in W5500 library function
by Bohu-Tang ·
Thank you very much for solving my confusion with your answer.
RE: RE: Macro definition problem in W5500 library function
by Bohu-Tang ·
Sorry,Eugeny,I just looked at the W5500 datasheet and Socket 0 Register corresponds to 0x01 and 0x08 corresponds to the Reserved field.Am I looking for the wrong register location?
RE: Macro definition problem in W5500 library function
by Eugeny ·
You are looking into wrong place. Read the 2.2 of the datasheet, it will answer your question. 0x08 is bank (block) address of 0x01 shifted 3 bits left because lower 3 bits are occupied by other flags.
RE: Macro definition problem in W5500 library function
by Bohu-Tang ·
Thanks a lot Eugeny. Your answer clears up my confusion.