Skip to content

DHCP wrong UDP condition #160

@mrx23dot

Description

@mrx23dot

for W5500

In DHCP_run

  if(getSn_SR(DHCP_SOCKET) != SOCK_UDP)
     socket(DHCP_SOCKET, Sn_MR_UDP, DHCP_CLIENT_PORT, 0x00);
         setSn_MR(sn, (protocol | (flag & 0xF0)));
         setSn_PORTR(sn,port);
         setSn_CR(sn,Sn_CR_OPEN);   //opens UDP socket
         while(getSn_CR(sn))   // this times out, CR content is  2,  which means LISTEN,

eventhough it says
// After W5500 accepts the command, the Sn_CR register is automatically cleared to 0x00.
so which is it 0 or 2?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions