Pico RP2040 event driven C example for TCP server
Ethernet Chips
No replies yet. Be the first to reply.
Join the discussion.
Ethernet Chips
No replies yet. Be the first to reply.
Join the discussion.
Share projects and connect with makers.
Joined before the site update? first.
New to WIZnet Makers?
We sent a verification link to your address. Open it to activate your account, then log in.
Accounts from this email provider are reviewed by an administrator after verification. Approval usually takes one business day.
Already have an account?
Enter your email address. If it belongs to an account, we'll send a link to set a new password. Members who joined before the site update use this to set their password.
If an account uses that address, we sent a link to set a new password. The link works once and expires in 30 minutes.
Know your password?
Need an account?
RE: Pico RP2040 event driven C example for TCP server
by lawrence WIZnet ·
Hello, @Colin_Bate
Thank you for your interest with pico ethernet.
if you look for interrupt handing drive, we currently do not have it.
There is interrupt pin from W5100S and it connected to rp2040. but to be implemented.
Is there reason why you want to use it with Pico-W?
RE: RE: Pico RP2040 event driven C example for TCP server
by Colin Bate ·
Hi Lawrence, thanks for your reply, I use the Pico as I have purchased 3 x Pico RP2040 boards as I want to use a LAN connection, not Wifi for a few projects I have.
I have solved my initial problem with being interrupt driven, I used a modified example of the lwIP loopback.c, it still polls but this seems very efficient passing 60 Pkts/second.
I’m now struggling to get the time from a NTP server via UDP using lwIP. Any guidance would be much appreciated (i.e. are there equilivant functions for (udp_sendto… etc.)
BTW: is it possible to mix lwIP with standard WIZnet non lwIP code in the same application?
many thanks \Colin
RE: Pico RP2040 event driven C example for TCP server
by Colin Bate ·
I have been able to successfully implement setting the RTC via a NTP server using:
retVal = udp_sendto(state->ntp_pcb, p, (const ip_addr_t *)&state->ntp_serverIp, NTP_SERVER_PORT);
…and a callback via
udp_recv(state->ntp_pcb, ntp_udp_recv_cb, state);
Thanks