0
\$\begingroup\$

I am running micropython 1.14 (happens also on 1.9) on the NUCLEO-H743ZI dev board (compiled using the board definition in micropython, no further changes) connected to a W5500 shield.

The issue I am seeing is some kind of delay when sending UDP packets and also when just pinging the board. The ping goes from 1ms to 200ms and it seems to be cycling (like there is some fixed polling or something), going down and up: Running on micropython

Connecting the same shield to Arduino Uno yields the correct behavior, ping is 0.2ms: Running on Arduino Uno

\$\endgroup\$
0

1 Answer 1

1
\$\begingroup\$

I found the issue to be the implementation of W5500 in micropython, it uses a scheduled task that polls every 128ms (no idea why 12) in ports/stm32/modnetwork.c

// Poll lwIP every 128ms
#define LWIP_TICK(tick) (((tick) & ~(SYSTICK_DISPATCH_NUM_SLOTS - 1) & 0x7f) == 0)

W5500 has a interrupt pin so I might need to change the implementation with an interrupt on that pin

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.