Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

W5500 Network info Getting Reset to zeros #128

Open
Ashvin22 opened this issue Nov 30, 2022 · 1 comment
Open

W5500 Network info Getting Reset to zeros #128

Ashvin22 opened this issue Nov 30, 2022 · 1 comment

Comments

@Ashvin22
Copy link

Ashvin22 commented Nov 30, 2022

Hi,

I am working on W5500 as TCP clinet with STM32.

At power cycle reset I am configuring W5500 with bbelow details and i have read back the configuration details to verify it.
I am debugging TCP client application with debug logs over serial communication to monitor the status of application.

                `PHY Status > conf.raw->={0xBA} , conf.by = {0}, conf.mode={7}, conf.speed={1}, conf.duplex={0}
                
                =======================================
                 WIZnet W5500 EVB Demos v4.00
                =======================================
                IP: 192.168.000.115
                GW: 192.168.000.001
                Net: 255.255.255.000
                
                >>> :: SnCrntState - SnPrevtState : 0x00 -  0x13 :: <<<
                TCP client start
                socket 0 open success
                >>> :: SnCrntState - SnPrevtState : 0x13 -  0x00 :: <<<
                try to connect 192.168.0.156:5000...`

After configuration is done i am able to connect with server, able to sent and receive data.
`>>> :: SnCrntState - SnPrevtState : 0x17 - 0x13 :: <<<

              0:Connected to - 192.168.0.156 : 5000
              0:recv size:1
              0:recv data:[1]
              0:send size:16384
              0:recv size:1
              0:recv data:[1]
              0:send size:16384`

It is working fines for few minutes and then rendomly disconnect from server and when I have place debug logs for network info in socket closing state, i am getting all configuration as zero.
`>>> :: SnCrntState - SnPrevtState : 0x00 - 0x17 :: <<<

            TCP client start
            0 socket -3 open fail
            IP: 000.000.000.000
            GW: 000.000.000.000
            Net: 000.000.000.000` 

I am not getting any idea , how the network configuration has been reset.

Can anyone help me here to trace the issue?

Thanks & Regard,
Ashvin Makwana

@ulri-me
Copy link

ulri-me commented Jan 6, 2023

That's quite hard without knowing the whole code.

Without a register write or power cycle the registers wouldn't reset, so I would start with the hardware. Please verify that the power supply of your W5500 is stable, e.g. by tracking with a multimeter) and track executions of reset functions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants