Waiting for Arduino UNO R4: who is RA4M1?

Waiting for Arduino UNO R4: who is RA4M1?

After the official announcement of Arduino, posts and blogs about the upcoming puppy, UNO R4, have multiplied.

Unfortunately, however, the news is always the same, the (few) official ones on the website or in the institutional blog.

The project is armored, and this, chapeau, is an excellent marketing strategy that is creating a lot of expectations, I myself clicked on the "notify me when it will be available" button.

In the meantime, what do we do, do we keep reading the same news over and over again?

No, since I'm curious, I want to try to understand something more with you, starting from the declared endowment and trying to make some considerations.

The datasheets of Renesas RA4M1 and Espressif ESP32-S3 (the chip present in the WIFI version) are publicly available, but since preparing a cake and eating it is better than reading a recipe, I bought the evaluation kit EK-RA4M1 from Renesas, to touch with hand what we will find in front of us.

Non è stato fornito nessun testo alternativo per questa immagine

Why Renesas?

After Microchip, which acquired Atmel, the manufacturer of the 8-bit chips and ST Microelectronics, which supplies the PRO series and GIGA R1 WIFI chips, there is a new brand joining the Arduino ecosystem.

All my sympathy goes to the team of programmers.

Renesas is a Japanese company present in the Top 5 Players of the microcontroller market, it has also recently acquired Intersil to extend its range in power electronics.

One of the reasons for this choice, however, in my opinion, could be represented by the supply voltage. The RAXXX family can be powered from 1.6 to 5.5V, and since UNO R4, electrically, is compatible with UNO R3, which uses 5V circuitry, the adoption of this chip avoids the use of level shifters that would complicate the project and penalize the performances.

Remaining in the ST world, they could have used STM32F411CEU6, mainstream, very cheap and equivalent in terms of performance and equipment, which also has mbed support; however, like all ST chips, it works at 3.3V.

Which RA4M1?

Meanwhile I hope not to disappoint you, but what we see in the photos is a render, RA4M1 is a subgroup of RAXXX, the MCUs have much more information, such as group, series, family and also the operating temperature.

This, for example, is the real RA4M1 on my board.

Non è stato fornito nessun testo alternativo per questa immagine

There are 7 models of RA4M1. But which one will we find on our UNO R4?

Non è stato fornito nessun testo alternativo per questa immagine

If the render is faithful, such as package and number of pins, we have a 64-pin LQFP, so the choice is reduced to two candidates:

R7FA4M1AB3CFM#AA0 or R7FA4M1AB3CFM#HA0. In reality it changes little, the first has 4 DMA channels, while the second has 8. Personally, I think it's the first, because in the various product lists, the second model often doesn't appear.

At this point we know the real characteristics. Starting from the official Renesas table

Non è stato fornito nessun testo alternativo per questa immagine

We can integrate the new information

Non è stato fornito nessun testo alternativo per questa immagine

Unfortunately, due to the form factor compatibility with UNO R3, we will not be able to use all these features, such as the number of I / O.

It might seem like a waste, but it's not like that, having the possibility of replacing UNO R3 in an almost "plug and play" way in projects where performance and memory are penalized, is a significant advantage, and this is the goal of UNO R4.

A few more connectors would have compromised compatibility, creating further confusion in the range. If you need more I/O, the right choice is GIGA R1 WIFI which as a form factor is compatible with MEGA 2650 and electrically similar to the DUE.

As for the other declared features not present in UNO R3, we will probably see the multiplex of some pins; for example, in RA4M1, the CAN terminals (CTX0 and CRX0) are the second function of the GPIO group P4, specifically P401 and P402, therefore most probably part of the GPIO of UNO R4 will consist of this group.

We'll see how they moved in this direction, it's difficult to make further hypotheses at the moment.

WIFI

The WIFI chip is an Espressif ESP32-S3-MINI module, there are 2 of them, one has an IPEX antenna, so the choice falls on the ESP32-S3-MINI-1.

It is not a "simple" WIFI module, it is a dual-core 32-bit Xtensa? microcontroller with LX7 processor at 240MHz. It has even more memory than the RA4M1 main processor, and inside it contains GPIO, UART, QSPI, I2C and CAN and many other things.

Now, the question is: why use a very oversized ESP32-S3 instead of the Murata 1DX module present on the GIGA R1 WIFI?

It will almost certainly not be possible to use the GPIO pins, but it would be really interesting if there were the possibility of communicating with it to exploit its memory or calculation capacity, and I hope this is the answer.

We'll see, even in this case, for now, it is not possible to make other hypotheses.

However, regardless of what we will discover, this family has an extremely stable and performing WIFI / BT compartment, which, in my opinion, based on tests made, is the best currently on the market; so I'm happy with this solution.

For those interested in the ESP32 family, this is the official Espressif DevKit that I use. It mounts an ESP32-S3-WROOM-1, a slightly more equipped version.

Non è stato fornito nessun testo alternativo per questa immagine

Flash / Debug

On the EK-RA4M1 board debugging is entrusted to a Renesas S124, a 32Bit Cortex M0 MCU working at 32MHz, which acts as a J-Link interface. The system is similar to the STLink-V2/V3 SWD interface found on board the ST Microelectronics Nucleo and Disk boards.

But we are talking about evaluation boards, UNO R4 is an "operational" board that must also maintain low costs, so I imagine that loading in Flash takes place, in a canonical way, through the SCI interface configured as UART via USB, a possibility available for the whole RAXXX family.

Non è stato fornito nessun testo alternativo per questa immagine

At the very least, it is possible that under the yellow rectangle we will find a JTAG connector to connect an external debugger, a very expensive option given that it does not appear that Renesas has a low-cost debugger kit like ST Link V2/V3, and programmers on the market, for example SEGGER, are designed for professional use and have prices very far from the world of Makers.

Non è stato fornito nessun testo alternativo per questa immagine

However, there is a solution, in the worst case it is possible to purchase an EK-RA4M1 or EK-RA4M2 type board and use the S124 chip, configuring the jumpers in a very simple way, to program external boards. It's a bit cumbersome option, with ST it's not necessary because programmers start at €4, but it could be the only solution to resurrect a bootloader deleted by mistake.

The photo shows the debug section of an EK-RA4M1, an honest job of segregation has been done.

Non è stato fornito nessun testo alternativo per questa immagine

RTOS

The FSP (Flexible Software Package) supports Azure RTOS and FreeRTOS, there is no trace of mbed.

If we see an RTOS, therefore, it will be one of these, I imagine very complicated and honestly useless that a port of mbed has been made.

We will most likely, at least initially, program it "smooth"; however, given the target, it is not strictly essential to have RTOS support, I assure you that with careful management of interrupts and timers, on a board of this type, it is often possible to obtain better results.

Road test of RA4M1

The EK-RA4M1 board that I used is an evaluation board, its purpose is to gain experience on microcontrollers, therefore all the pins are shown on the external connectors and it is possible to fully explore all the features in view of a definitive project in which only some pins will be used. The function assignment and the various parameterizations can then be tested. The processor it mounts is in an LQFP 100 package, same features but a greater number of GPIOs.

Here I have compared the EK-RA4M1 with an Arduino UNO R3.

Non è stato fornito nessun testo alternativo per questa immagine

I would like to point out that the evaluation boards are not created for a "definitive" use, the high number of pins is convenient in the experience phase, but represents a limit in the field due to the size of the board, so I personally don't see them as an "alternative ” to UNO R4, they are two different things.


I didn't know the Renesas microcontrollers before, so as soon as I received the board, I had to install the complete development system: editor, toolchain and basic libraries which here are called FSP (Flexible Software Package).

The development system is e2 studio, an integrated environment derived from Eclipse as STM32CubeIDE.

Non è stato fornito nessun testo alternativo per questa immagine

The editor

Non è stato fornito nessun testo alternativo per questa immagine

Even the working method is the same, first you need to configure the clock and all the required features (Interrupts, DMA, Timers etc..), then you need to assign them to the MCU pins.

At this point the HAL interface will be generated, i.e. the part that will initialize the CPU in the startup phase, in our case the hal_entry.c file

Finally, we are ready to write our code and import some necessary libraries.

The clock configuration

Non è stato fornito nessun testo alternativo per questa immagine

Pins configuration

Non è stato fornito nessun testo alternativo per questa immagine

Following are two STM32CubeIDE configuration pages, apart from a little choreography there are no substantial differences in the way to proceed.

Non è stato fornito nessun testo alternativo per questa immagine
Non è stato fornito nessun testo alternativo per questa immagine

I did not find abysmal differences in the two development systems, both because both are derived from Eclipse but also because by now the way to proceed in programming ARM Cortex is quite consolidated.

It should be emphasized that we will not be called to this type of design, in UNO R4 the assignment and functionality of the pins are already established, all the parameterization will be the responsibility of the bootloader during startup.

What we will see will be the usual two reassuring functions setup() and loop().

I haven't done complex tests yet, I've limited myself to modifying some example programs, but I haven't had any problems.

Non è stato fornito nessun testo alternativo per questa immagine

My first impressions of the RA4M1?

Unfortunately, I can't surprise you with special effects, it's a Cortex M4 and it behaves like all the Cortex M4s I know, neither more nor less. On the other hand, it could not have been different, the ARM part is standard for all these MCUs, I would have wondered (and worried) if it hadn't.

From another point of view, however, it is reassuring news, we shouldn't expect surprises.

Conclusions

After GIGA R1 WIFI, with UNO R4 we are witnessing a significant expansion of the makers range; together with the growth of the PRO range, which I talked about in another article, this is the second direction along which Arduino moves.

Now that there are three quite different architectures, I would like to point out the significant added value of the Arduino IDE, its multi-target architecture hides the underlying complexity well. It is not perfect, debug side, there is work to be done, but they are doing it well and its goal achieves it.

Make a simple consideration: to use a Renesas RA4M1 (or a RA6M5, that of Portenta C33) and an STM32H7 at the same time, using the canonical tools, we need to install and learn STM32CubeIDE, e2Studio and a lot of other additional configuration and communication software. The software modus operandi, as we have seen, is similar, but the HAL layers, for obvious reasons, are completely different, and I assure you that it may not be very simple without the necessary experience.

We must never forget Arduino's goal: to make something that is actually quite complex behind the scenes simple and fun, even for middle school students.

It is remarkable how Arduino moves at such a high speed despite having practically no major competitors to bother it. Many years ago, I was in Shanghai at an event on the excellence of Made in Italy, wine, fashion and Ferrari, I would like to meet Arduino next time.

Francisco Javier Rodríguez

Electrónica, medición y control a la medida para Pymes | Soluciones listas para usar | Tecnologías Cortex y Arduino

1 年

Hi! (again) Do you know if the JTAG/SWD facility is exposed in the the #arduino UNO R4 Wifi, and if it's possible to debug/program them with the appropiate tools? Greetings from Mexico City!

回复
Francisco Javier Rodríguez

Electrónica, medición y control a la medida para Pymes | Soluciones listas para usar | Tecnologías Cortex y Arduino

1 年

Hi! What do you think about still programming these monsters with the awful super-loop model? Wouldn't be nice to program from the main() function, as usual in all other embedded systems?

要查看或添加评论,请登录

Davide Nardella的更多文章

社区洞察

其他会员也浏览了