WIZNET5K.regs() hardcodes 4 sockets instead of using _WIZCHIP_SOCK_NUM_ #19521
Unanswered
DoubleVee73
asked this question in
Hardware & Peripherals
Replies: 1 comment 1 reply
|
Thanks for sharing @DoubleVee73. Do you plan to submit a PR with this fix ? |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
The regs() debug method on network.WIZNET5K dumps per-socket registers
using a hardcoded loop bound of 4. This is within the network_wiznet5k.c file in micropython/extmod line 820.
On a W5500 (8 hardware sockets), this means regs() never shows
sockets 4-7. The function already has access to WIZCHIP_SOCK_NUM
which is used correctly elsewhere for this purpose, just not in this loop.
Fix is a one-line change:
I found this while debugging a socket-exhaustion issue on a W5500.
The register dump looked incomplete compared to what I could see
reading the chip directly over SPI, which is what led me here.
All reactions