Arduino Uno r4 (minima and wifi)

I imagine most of you have have seen the announcement about the Uno r4 reboot.

They’ve released two versions:

  • Uno r4 minima (48Mhz M4 from Renesas + 32 kB SRAM / 256 kB flash / 8 kB of EEPROM)
  • Uno r4 wifi as above but with additional esp32 acting as wifi/bluetooth module

It has some tasty additions like 24V supply, can bus (requires external tranceiver), qwiic connector, 14 bit adc

It is possible that the Renesas might work without code changes as they’ve tried to make it compatible, but I suspect optimisations might be possible.

(Putting on my :fire: :coat:) Perhaps we have a reason to deprecate Uno r3 which struggles in so many ways to work well with SimpleFOC. :bomb: :smile_cat:

Conversely Uno r4 makes the SimpleFOC Shield a much stronger proposition.

Interesting. Money talks, money walks, and we all ask questions. Yes, I know, I always come across negative.

Renesas is inferior to pretty much any other MCU in that class, but very recently the Japanese invested $10MM in Arduino, and got one of their top executives (VP) join Arduino’s board of directors, so I guess they are buying their way into the game. Whatever.

Sure, I’m interested in trying it out. What do we do?



I finally managed to order them - both the R4 Minima and the R4 WiFi - after their site was down all day yesterday… I guess people really want those new UNOs :slight_smile:
I also have the Portenta C33 sitting on my desk, another Renesas MCU.

So I’ll check out the Arduino Framework for these chips this weekend, and write a PWM driver for them so we can test them out. We have to hope the boards pins are configured in a way that lets us do 6-PWM, assuming the MCU’s timers support it. I have yet to check into it.

I really agree with this. Lets see how the MCU is, but if it performs well and they gave us enough PWM and analog pins, then I think especially the WiFI model could be an excellent platform for experimenting with the SimpleFOC shield.

1 Like

So I took a look over the UNO R4 datasheet, and it looks like not only does the chip have good motor control features, but the Arduino folks also kindly routed out a bunch of PWM pins we can use. It looks like it will be compatible with the SimpleFOC shield :slight_smile:


I spent the last week working on it, and have merged an initial PWM driver for the UNO R4 Renesas MCUs:

It supports all the PWM features:

  • 1-PWM, 2-PWM, 3-PWM, 4-PWM
  • 6-PWM with software dead time (using 2 timer channels)
  • 6-PWM with hardware dead time (using the A and B outputs of a single channel)
  • setting phase state in 3-PWM and 6-PWM
  • arbitrary PWM frequencies from 1Hz to 48kHz (or even a little more)
  • setting output polarity

We don’t yet support current sensing, but it will follow.

The code has been merged to the dev branch of SimpleFOC, and if anyone has an UNO R4 and feels like testing it out, that would be greatly appreciated.


That was quick! Nice work @runger


Does the Uno R4 still have just 2 interrupt pins (2 & 3)? I cant find this info easily in the documentation.

So for Hall Senors I would have to use software interrupts?

The datasheet for RA4M1 suggests there are more… but the arduino docs still say there are only (2&3):

They probably limit the interface to the other interrupts in the Arduino abstraction.

Yes, I would assume it’s more, not sure if you can use them via Arduino’s APIs though.

Certainly for the PWM pins it’s far more than they indicated. I think they mainly implement those pins that the original UNO had, that’s what they define as “Arduino”