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
ports/rp2/boards: add new definition files for W5500_EVB_PICO board. #8962
Conversation
rp2/boards/W5500_EVB_PICO: directory added rp2/boards/W5500_EVB_PICO/board.json: file added rp2/boards/W5500_EVB_PICO/mpconfigboard.cmake: file added rp2/boards/W5500_EVB_PICO/mpconfigbaoard.h: file added rp2/boards/W5500_EVB_PICO/readme.md: file added Signed-off-by: github@mymeterinfo.info
The commit message (not the PR message) should e.g. be formatted as: ports/rp2/boards: Add new definition files for W5500_EVB_PICO board. Capital A at Add and a full stop at the end. You can change that locally with: git commit --amend And then push again with: git push -f origin W5500_EVB_PICO Assuming that in your set-up the remote repository is called origin. |
Thanks for your help. It's really driving me nuts. However, I did the git commit -amend, but the git push return a |
git push -f -f like force update. |
Yes I did. In fact I copied/pasted your command:
|
Does |
No. git log shows only the previous (faulty) one.
|
rp2/boards/W5500_EVB_PICO: Directory added. rp2/boards/W5500_EVB_PICO/board.json: File added. rp2/boards/W5500_EVB_PICO/mpconfigboard.cmake: File added. rp2/boards/W5500_EVB_PICO/mpconfigbaoard.h: File added. rp2/boards/W5500_EVB_PICO/readme.md: File added. Signed-off-by: github@mymeterinfo.info
When you run |
You have three commit now. The second one was fine, but the last one with a merge is wrong again. |
rp2/boards: Merge branch of https://github.com/omogenot/micropython into W5500_EVB_PICO. Signed-off-by: github@mymeterinfo.info
I don't know why again ! But anyway. All this time spent (you and me) for a missing . I have a simple fix to apply to allow IRQ usage with WIZNET5K object. in file I will abandon this PR (again), and may be create a new one for the mDNS support I am currently writing. But this PR procedure is way too complicated. I would have loved to contribute... |
git is sometimes really challenging. Just leave the PR open. A failed commit message check is not the worst that can happen. |
Technically I can do that, But I would have to test it before. I used WIZNET5500 only with a PyBoard until now. But the change should affect that combination as well. |
Well, just spend 2 minutes to have a look at these lines in the code, and you will easily see that this line was left there by mistake and blocks the ability of adding an optional Irq pin parameter if using LWIP (which handles this irq). |
So I looked at the code, but cannot use it with PyBoard, which uses a different function for make new. I could use a genuine rp2040 and connect the lwip board to it. That may mimic a W5500_EVB_PICO board. |
So this combo works. Checking against your PR, there is no dhcp() method.
nic.ifconfig() returns ('0.0.0.0', '0.0.0.0', '0.0.0.0', '0.0.0.0') after instantiation, but after nic.active(1), dhcp gets active and fetches an IP address. |
Hum, funny. I did not notice it because this comes from the W5100S_EVB_PICO definition files. It probably does not make sense there either. |
Manual setting of the interface parameters works. Test script:
Ping times without INTN ~34ms, with INTN ~0.8 ms. |
Way cool ! |
Two things seen while testing:
10.0.0.152 it the IP of the PC. |
In the meantime, I discovered a case during the init that could brick the pico device:
The system hangs and is bricked. |
I had seen bricks a few time when configured with the Pin arguments without the Pin mode being set. |
The network.route() thing is found & fixed. The call for registering the nic was missing in the LWIP path. |
@robert-hh : Good job, is it related to the bug I found, that bricks the device when .active(True) is called before doing a .active(False) just after creating a new WIZNET5K object? Does it mean that my "fix" consisting in doing a call to |
As for Ping: Instead of a ICMP message, a UDP datagram containing the ICMP message is sent. |
It may be related. I cannot tell at first glance. It is a pretty lengthy chain of calls which are made. My fix just adds:
at the end of the function wiznet5k_init(). But you could move that as a trial to the begin of the function. My guess is that the lock-up happens because the IRQ fires before completely set-up. |
OK. However, my tests show that the lock-up occurs in |
OK. Here are the results...
After the second nic.active(True), the device hangs forever. Applying your modification does not cure the problem. Applying mine does. Let apply both :-) |
I can reproduce the lock with a different set-up, using the explicit setting of SPI and Pin. With the default set-up, it does not happen. And if it worked once, it continues to work until the next power cycle. Which indicates a non-initialized variable. |
I chose the default WIZNET5K object creation to simplify the test case, but it behaves the same way with "manual" SPI and Pin assignment (with ou without IRQ pin):
If you apply my patch, does it still hang? |
ports/rp2/W5500_EVB_PICO/readme.md: Correct and update WIZNET5K object usage to comply with current source code. Signed-off-by: github@mymeterinfo.info
Yes. I applied the patch and it still hangs. Patched function below. And if I look at
It fails in wiznet5k_lwip_init() at the call to netif_add(). |
My set-up example was wrong. This one works:
With and without IRQ |
So I dropped the
|
For me the |
OK. I'll put that back into the code. But I still cannot see why that makes a difference, and that should better be understood.
|
@robert-hh |
Normally this is not a show stopper. The PR approval process is very slow, and there are 276 PRs in the queue. That seems impossible to handle. |
Thanks for the contribution, this looks fine. Squashed and merged in 6e51dbd with modified commit message. |
Fix ssl.SSLSocket bind() error checking
rp2/boards/W5500_EVB_PICO: directory added.
rp2/boards/W5500_EVB_PICO/board.json: file added.
rp2/boards/W5500_EVB_PICO/mpconfigboard.cmake: file added.
rp2/boards/W5500_EVB_PICO/mpconfigbaoard.h: file added.
rp2/boards/W5500_EVB_PICO/readme.md: file added.
Signed-off-by: github@mymeterinfo.info