I was looking up Arduino boards, and that got me thinking: why do some boards have two processors while other boards have only one?
Take for instance the Arduino Uno. It uses the ATMEGA16U2 and the ATMEGA328P. Now the ATMEGA328 doesn't have USB capability, so the ATMEGA16U is used to allow for USB capability and communicates with the ATMEGA328 via serial (TX and RX, unless I'm mistaken). That's one case where I see it is necessary. In other cases, I saw that they only have one processor, like the Micro and the Leonardo which uses the ATMEGA324U4. They have built-in USB communication, so there's no need for a secondary processor.
However, what made me think about this question was the Nano Every. It uses two processors: the ATSAMD11D14A and the ATMEGA4809, communicating with each other via TX/RX like with the Uno since the ATMEGA doesn't have USB. However, if the ATSAMD11D14A can do the same thing that the ATMEGA4809 can, why have the ATMEGA4809 at all? Why not just design a board around the ATSAMD11D14A and cut out the ATMEGA4809? Specs-wise, the ATSAMD11D14A seems to be superior to the ATMEGA4809, so what are the benefits of having the ATMEGA4809 alongside the ATSAMD?
If this were an eval board for a 4809, then the focus is on the 4809 device. The SAMD11 is likely just there to provide a way of programming the 4809 so you don't need external tools. The SAMD11 probably also provides a USB-Serial interface as well.
That explains why the Nano Every Tech Specs are from the ATMEGA4809. So, if it's all about the focus, if one were to remove the 4809 just have the SAMD11, could the SAMD11 theoretically do everything the 4809 can? Specification-wise, the SAMD11 seems superior, though the only major difference to me is the processor, with the SAMD11 being ARM-Cortex-M0 and the 4809 being AVR. If all the SAMD11 is doing on the Nano is acting like a USB-Serial interface, it kind of feels like it's being underutilized. Could there be another reason for this dual architecture?
On that note, if you were to develop your own Nano Every, does the SAMD11 have to be pre-programmed in order to make it compatible with Arduino programming software, or do you have to pre-program the 4809? How would you do so via a bootloader?
The ESP32 has 2 processors. One processor has 2 cores. Normally WiFi is put on one core and the programmer's program is put on the other core. I use, from time to time, the 2nd processor to write code that runs whiles the main 2 core processor is asleep.
I believe that the SAMD51 is also a programmer for the 4809. The 4809 can programmed using the UPDI (Unified Program and Debug Interface).
You can build a UPDI programmer using an Arduino UNO (or Nano etc) in order to get a bootloader into the 4809. Have a read of this: Minimal ATmega4809 on a Breadboard.
Ok. So the SAMD51 programs the 4809 via UDPI, and it communicates with it via serial. Got it. I was thinking somehow that with the SAMD51 acting the way it does (holding some boot program in flash), it doesn't have enough space to run programs, so it programs the 4809 instead which isn't bogged down by pre-loaded programs on it.
Nevertheless, like with the Leonardo, could you just build a board with the SAMD51 only and program it with Arduino software? Or does the software not support programming the SAMD51 directly?
When I would make the Arduino boards, then I would make boards with a single ATSAMD21G processor and leave the AVR chips behind me. If a board with stronger outputs is needed, then I would still use the ATSAMD21G and add extra logic buffers.
The ATmega4809 can do everything a ATmega328P can do and more.
The main problem of a Arduino Uno is that the serial port is used to upload a sketch. The ATmega4809 has more serial ports, so also a serial communication to a Wifi module can be added without problem.
It is just a modern version of the Arduino Nano. That's all.
Okay, it needs a usb-serial chip to communicate with the computer. That can be any usb-serial chip. If that happens to be a more superior chip than the ATmega4809, so be it.
If you want a ATSAMD, then buy a Arduino MKR Zero. The ATmega4809 is a basic microcontroller for basic things. Without headers, the Nano Every costs 10 euros. That is reasonable for a basic board.
Regarding the memory, also consider that there is significant overhead for the USB CDC stack. In fact, the "MuxTO" firmware that provides the UPDI programming and CDC passthrough capabilities on the Nano Every doesn't even fit in that memory when compiled with the latest version of its hardware package. So not so much underutilized as you might think!
Sure you can find some specs that are superior, but it's certainly not accurate to claim they all are.
But I do think the ATSAMD11 is a very interesting chip since it has good support by the Arduino ecosystem and is available in an IC package that is easy to hand solder. In addition to the Nano Every, Arduino also uses it on the MKR Motor Carrier. It's really cool to me that the firmware in both these cases is an Arduino sketch, and thus very accessible to the Arduino community for tinkering.
OK, first of all, the SAMD51 is something different. That is a much more capable chip. Adafruit has embraced that family and provides nice support for it via their "Adafruit SAMD Boards" Arduino boards platform as well as CircuitPython
But as for programming the ATSAMD11 with the Arduino development software, the answer is also "yes!" There is this nice 3rd party boards platform:
That is even the one Arduino uses for the "MuxTO" and MKR Motor Carrier firmware.