diff --git a/ports/renesas-ra/lwip_inc/lwipopts.h b/ports/renesas-ra/lwip_inc/lwipopts.h index 036da9bcef..f7dc80cc38 100644 --- a/ports/renesas-ra/lwip_inc/lwipopts.h +++ b/ports/renesas-ra/lwip_inc/lwipopts.h @@ -42,12 +42,14 @@ extern uint32_t rng_read(void); #define LWIP_RAND() rng_read() -// lwip takes 26700 bytes -#define MEM_SIZE (8000) -#define TCP_MSS (800) -#define TCP_WND (8 * TCP_MSS) -#define TCP_SND_BUF (8 * TCP_MSS) -#define MEMP_NUM_TCP_SEG (32) +#define MEM_SIZE (16 * 1024) +#define TCP_MSS (1460) +#define TCP_OVERSIZE (TCP_MSS) +#define TCP_WND (8 * TCP_MSS) +#define TCP_SND_BUF (8 * TCP_MSS) +#define TCP_SND_QUEUELEN (2 * (TCP_SND_BUF / TCP_MSS)) +#define TCP_QUEUE_OOSEQ (1) +#define MEMP_NUM_TCP_SEG (2 * TCP_SND_QUEUELEN) typedef uint32_t sys_prot_t; diff --git a/ports/renesas-ra/mpnetworkport.c b/ports/renesas-ra/mpnetworkport.c index 2bc6bf4399..8e16c2b1b4 100644 --- a/ports/renesas-ra/mpnetworkport.c +++ b/ports/renesas-ra/mpnetworkport.c @@ -67,8 +67,8 @@ void mod_network_lwip_init(void) { timer_started = false; } // Start poll timer. - soft_timer_static_init(&network_timer, SOFT_TIMER_MODE_PERIODIC, 128, network_timer_callback); - soft_timer_reinsert(&network_timer, 128); + soft_timer_static_init(&network_timer, SOFT_TIMER_MODE_PERIODIC, 50, network_timer_callback); + soft_timer_reinsert(&network_timer, 50); timer_started = true; } #endif // MICROPY_PY_LWIP