4 ms·
UDP transmitter implemented with PIO and DMA on the RP2040
- aappleby 3y agoRube Goldbergian :D
- detrites 3y agoIt appears they've overclocked the RP2040 quite a bit without also increasing voltage. First time seeing that. Eg, slightly higher at 250Mhz some RP2040's have been unstable without it: https://github.com/pimoroni/picosystem/pull/57 https://github.com/pimoroni/picosystem/pull/57
- bibaheu 3y agoIt can probably be a bit simplified by using IPv6, as that avoids the IPv4 checksum.
- crest 3y agoThey still have to compute the Ethernet frame check sequence.
- matzf 3y agoNo, the checksum just moves to UDP; in the current system, the UDP checksum is set to 0. This is not allowed in UDP/IPv6, where the checksum, calculated over both the IPv6 pseudo-header and the UDP payload, must usually be set.
- mschuster91 3y agoBit-banging Ethernet, now that is something I'd never thought to see.
- adql 3y agoThat's honestly more impressive than the UDP stuff
- mmastrac 3y agoTechnically all of these protocols are bit-banging once you get low enough in the stack -- it's just that the PIO is particularly well tuned for arbitrary protocol implementation. FWIW, I believe there is a real bit-banged ethernet stack on Atmel. https://hackaday.com/2014/08/29/bit-banging-ethernet-on-an-attiny85/ https://hackaday.com/2014/08/29/bit-banging-ethernet-on-an-a...
- dragontamer 3y ago10Mbit Ethernet isn't really that far outside the capabilities of today's microcontrollers. In fact, a lot of these uCs regularly push out 10Mbit SPI aka 10MHz. Its still impressive of course, for the level of effort to properly create Ethernet frames. But there's a reason why various Ethernet protocols are creeping up upon CANbus. People are realizing that these cheap $1 to $5 uCs actually have the compute power for 10Mbit Ethernet, and can talk full-on socket programming. I don't know when this realization started exactly, but more-and-more "low power Ethernet" options appear on the market, hoping to dethrone CANbus.
- speed_spread 3y agoAll those RP2040 hacks are impressive (HDMI, etc) but also suggest that the RP2040 is just slightly underpowered for many practical applications. I hope some cheap RISC-V MCU unbound by ARM licensing constraints (with Atomic ops+SIMD, unlike Cortex-M0) comes soon.
- mytailorisrich 3y agoWhat do you have in mind as "practical application"? For many, if not most, embedded MCU applications I would think that dual core at 133MHz is powerful.
- speed_spread 3y agoThe RP2040 is definitely powerful compared to other controllers, so much that it is bordering "general computing" applications. It feels like it is one push away from being able to run e.g. ucLinux which would put it in another category entirely.
- dragontamer 3y agoRP2040 is cost-optimized. Today, there are "computers" that are being used as $0.05 timers running at 32kHz clock. RP2040 is aiming at the $1.5ish price point and is somewhat appropriate for the task. (I think that most of the Cortex-M32, M22, and M0+ competitors are a bit more pragmatic with regards to more capabilities in a single chip... but RP2040's niche is external flash, USB and a few other tidbits that hobbyists like) ----------- "General Purpose Compute" is like $5 to $15. ESP32 still isn't quite there IMO despite being larger than RP2040. I'm thinking you want something like TI's AM335x or NXP's i.MX6 processors. IMO anyway. But every price point from 5-cents to $15 has an option. The embedded world is extremely competitive. There will be that $6 processor with exactly the features you need to perform exactly the task you want. And a different processor at $3.50 that solves a different niche, and another processor at $11. Etc. etc. > ucLinux which would put it in another category entirely. A general purpose compute processor should support external RAM and external Flash for maximum flexibility for different tasks. That way, one die can be used in many different projects. Cost-optimized processors, like what the RP2040 and its bretherin in the Cortex-M0+ cost tier, are here for people who "can't afford" an external memory interface. Either due to power-constraints (external RAM costs more power) or cost-constraints (straight up dollars). The minute we hit $5+, we start seeing external memory interfaces supporting older 128MB DDR3 RAM and such and compute-capabilities per dollar shoots up dramatically. There's no point trying to compete against the $5 market with $1.50 chips. And forget uCLinux, these babies just run full on Linux (albeit with far less RAM/compute than a normal computer...) ------- Like: 50-cents of NOR-flash just doesn't get you as far as a microSD card sorta thing. RP2040 is still on the "low-cost" side of the efficiency curve, if anyone cared about compute performance they'd spend $5ish to $10ish more dollars.