Arduino UNO - Rev4 - Page 1
Forum section: electronics / general

author: ppTRN
author_rank: Regular Contributor
timestamp: March 28, 2023, 08:09:57 pm
content: so, as you might have heard of, the new Arduino UNO rev4 is about to get released at the end of May. They will make a wifi version using ESP32-S3 and a cheaper version widout wifi connection, the main uC will be an RA4M1, but yet there is a hidden block to be descovered. Also supply input voltage up to 24V and usb C. What do you think about that? I am surely getting my hand on one of those as soon as it gets out.https://store-usa.arduino.cc/pages/unor4

author: sleemanj
author_rank: Super Contributor
timestamp: March 28, 2023, 08:20:10 pm
content: Personally I think it's stupid to call it an UNO R4 when it doesn't have a ATMega328.It's just going to confuse new people when things written for an UNO don't work on their UNO.Should have given it a new name.

author: floobydust
author_rank: Super Contributor
timestamp: March 28, 2023, 08:21:04 pm
content: Renesas RA4M1? What a huge mistake. The politics of Arduino, killing it off.Should've stayed with SAMD21 or SAMD51, nobody likes Renesas for their asshole supply chain and obscure nature. 93 week lead times.A new UNO should just be upgraded 328PB, 328P is near end of life.

author: SiliconWizard
author_rank: Super Contributor
timestamp: March 28, 2023, 08:26:52 pm
content: Whether they kill themselves or not, I personally don't particularly care.The Arduino ecosystem has gotten so big that there are literally hundreds of supported boards and MCUs. You don't need to use Arduino official hardware to use Arduino.If they want to kill themselves, so be it. "Arduino" as a framework is likely to keep going due to the gigantic user base.

author: ataradov
author_rank: Super Contributor
timestamp: March 28, 2023, 08:43:27 pm
content: I don't get that "hype" rollout. You either have a board to release or not. What's up with that yellow sticker covering half the board? I'm assuming it is some "but wait, there is more" thing to be disclosed later, but why? Probably CAN stuff, since they mention support, I assume they would have a transceiver, but I don't see too many people interested in that .I assume they picked Renesas part for 5 V compatibility. They explicitly advertise that. For mainstream board they care about supporting majority of shields, I guess.Also," UNO R4" name seems to conflict with some random knock-off board.Plus Renesas may be a good option for them for the supply reasons - they secured all the supply, no parts left for copies

author: SiliconWizard
author_rank: Super Contributor
timestamp: March 28, 2023, 08:57:13 pm
content: As to 5V compatibility, I understand the rationale for supporting a ton of existing "shields", but I don't think they are doing users a service here, outside of this. Which is a bit of a circular rationale. (They created a need and now they are stuck to it.)Except for niche applications and vintage stuff, not going to 3.3V logic for hobbyists these days does not make sense IMO. This is harming them more than it helps them, as can be seen in thousands of threads all over the world with people looking for 5V parts that are increasingly hard to find, or having to use level shifters all over the place.I remember in the late 90's, was still a student, going to 3.3V logic still felt like a "big" step back then for some reason. It's interesting to note that, largely "thanks" to Arduino, many hobbyists and even students in 2023 still feel the same.

author: ppTRN
author_rank: Regular Contributor
timestamp: March 28, 2023, 08:57:26 pm
content: Although i am fond of all the Arduino ecosystem (even Just beause i am relatively young and was growing up using an uno r3 for most of my Life) i must Say i am surprised about this new entry on the Arduino family. I could have bet that even them would have jumped in the single PC board, still integrated using a uC. Buy wait.. they actually already tried It with the yun...Anyhow, really disappointed by the 5V choice. I think It Is time to move forward

author: rteodor
author_rank: Frequent Contributor
timestamp: March 28, 2023, 09:41:20 pm
content: Quote from: ataradovI wonder how Renesas did that ? Out of the about 16 chip fabs inherited from NEC and Hitachi they kept only 2. And I think they almost burned one during the pandemic.Quote from: sleemanj+1.It might have something to do with registering an expensive new trademark ?Quote from: ppTRNA 5V tolerant chip is amustfor Arduino crowd. And being a Renesas device they could certainly have had a 12V tolerant chip.

author: RoGeorge
author_rank: Super Contributor
timestamp: March 28, 2023, 10:25:35 pm
content: Wasn't UNO at first models with FTDI + ATmega8? It became ATmega328 later.The good part with the 3V3 is that would be possible to run it from a single Li-Ion.

author: PCB.Wiz
author_rank: Super Contributor
timestamp: March 28, 2023, 10:31:39 pm
content: Quote from: SiliconWizard on March 28, 2023, 08:57:13 pmDepends on your values of nicheI'd say being able to drive Blue / White LEDS, serial LEDS and Higher power logic Level MOSFETS, are all quite important things for designers. Not niche at all.If someone is fine with 3v3 solution, they can use a Pi PICO or other not backward compatible solution.

author: brucehoult
author_rank: Super Contributor
timestamp: March 28, 2023, 10:54:06 pm
content: Quote from: RoGeorge on March 28, 2023, 10:25:35 pmNo. Even the Diecimila and Duemilanove were already ATMega168 or 328. The ATMega8 ones were simply "Arduino" or "Arduino Extreme" or "Arduino NG".

author: PCB.Wiz
author_rank: Super Contributor
timestamp: March 28, 2023, 11:02:20 pm
content: Quote from: floobydust on March 28, 2023, 08:21:04 pmTime will tell.Looks a nice part to me ?14bit ADC is certainly nice to have, as is a 12b DAC, tho I would have liked more than 1 DAC channel.5V is great to have, for Blue/White LEDs and serial leds and Power MOSFETS, and CAN, USB and Touch are also appealing.Looks like MICROE also like this part and havea small board with full debughttps://www.mikroe.com/ra4m1-clickerand Mouser have a larger board,also with Debughttps://www.mouser.com/ProductDetail/Renesas-Electronics/RTK7EKA4M1S00001BUThe Nuvoton M471 series could have been another choice, but maybe is too new ? - ADC/DAC not as good, but more flash/ram ? Oh wait, seems DAC and USB are exclusive ?https://direct.nuvoton.com/en/numaker-m471r1Quote from: floobydust on March 28, 2023, 08:21:04 pmSAMD21 and SAMD51 are not 5V...Quote from: floobydust on March 28, 2023, 08:21:04 pmThat's hardly an upgrade.Perhaps one of the DA/DB/DD etc could have made sense for an incremental step, but the RA4M1 makes sense as a larger step.Quote from: ataradov on March 28, 2023, 08:43:27 pmYes, that's a bit annoying. Besides CAN, the part has USB and touch and LCD.. maybe some of those get access ?I've seen AliExpress have more modules offering now with a small LCD included, that would be a cute additioneghttps://www.aliexpress.com/item/1005001543731001.htmlhas a TSSOP20 MCU from Nuvoton, making it flexible.andhttps://www.aliexpress.com/item/1005005365025142.htmlQuote from: ataradov on March 28, 2023, 08:43:27 pmYes, not a smart choice when google offers up so many UNO R4's

author: westfw
author_rank: Super Contributor
timestamp: March 29, 2023, 12:40:47 am
content: QuoteI've got to agree with that completely. The "Nano Every" was a naming disaster, and it kept the same AVR family. :-(An AVR128db48 would have been nice.Renesas, eh? Well, I guess it's about time that Arduino got out of bed with Atmel (now Microchip; I wonder if that had something to do with it?) But this seems like a strange choice; not particularly well known, nor powerful, nor cheap. I guess it has that 5V operation and IO...QuoteMan, I sure hope that they can get 3x performance by going from a 16MHz 8bit CPU to a 48MHz 32bit CPU. I wonder if that's actually acommitmentto "somewhat optimize" things like "digitalWrite()"? (alas, I suspect not.)

author: xrunner
author_rank: Super Contributor
timestamp: March 29, 2023, 12:46:11 am
content: Heck, I might buy one for a cheap thrill just to see if it works without code modification with one of my completed projects that's using an Uno. My little RF power meter could use the speed.I say cheap thrill - but what will the overpriced cost be for one?

author: brucehoult
author_rank: Super Contributor
timestamp: March 29, 2023, 01:55:28 am
content: Quote from: xrunner on March 29, 2023, 12:46:11 amYou are aware the Arduino Due with an 84 MHz Cortex M3 and 54 GPIOs (so like a Mega), 96 KB SRAM, 512 KB flash, 3.3V IO has been out for ... 12 years.This Uno R4 has half the clock speed, half the flash, one third of the SRAM, a third of the GPIOs of a dozen year old board.But it has an FPU.

author: ataradov
author_rank: Super Contributor
timestamp: March 29, 2023, 02:02:01 am
content: Quote from: brucehoult on March 29, 2023, 01:55:28 amI think the point of this board (and the unfortunate naming that comes with it) is to become the new mainstream version. The one that is default. And in that sense, having an obscure MCU is better. This way it just becomes the new "Arduino" MCU without associations to other boards or tools.They had a lot of derivatives, even official ones, but none managed to be successful.And I'm sure at this point they are severely running out of resources on that poor atmega.Plus Due is 3.3 V only, and 5V is apparently important enough to maintain for the main board.

author: xrunner
author_rank: Super Contributor
timestamp: March 29, 2023, 02:08:16 am
content: Quote from: brucehoult on March 29, 2023, 01:55:28 amThanks for the info Bruce. No I wasn't really aware. I have a stash of Uno boards so was trying to use them all in projects. But yea if I desperately needed more speed I would have needed to research available options better. However, it would still be interesting to try this board and see how it performs. But again your input is duly noted.

author: PCB.Wiz
author_rank: Super Contributor
timestamp: March 29, 2023, 02:43:26 am
content: I see there is alsohttps://www.hackster.io/news/bluetrum-launches-rt-thread-based-arduino-uno-like-risc-v-development-board-the-ab32vg1-8d532d3612d7says around $12.30 for 120MHz, but they may have made a strategic decision to avoid Chinese parts.Hmm... looks like VBUS is 5V but VDDIO is only 3v3

author: rteodor
author_rank: Frequent Contributor
timestamp: March 29, 2023, 04:47:02 am
content: Quote from: PCB.WizI can not understand why hardware onboard debuggers are not welcome in Arduinos.Arduino Zero - later renamed to Arduino M0 Pro (SAMD21G18 256KB flash / 32KB RAM) had EDBG chip that was an ATmega16 for onboard debugger. And it was in the same format as UNO. It disappeared around the time Microchip bought Atmel.It was the best Arduino for small tinkering IMO.

author: RoGeorge
author_rank: Super Contributor
timestamp: March 29, 2023, 05:37:03 am
content: Does the UNO R4 board has a hardware debugger or not?The new Arduino 2.x IDE is hardware debugging ready. The main downside for me at 2.x is that the offline "Find in Reference" contextual menu has been removed(double click a word in the source code, and right click "Find in Reference" to open the documentation webpage for it is no longer there).IDE 1.x was able to open the reference docs in an offline webpage.

author: Kerlin
author_rank: Regular Contributor
timestamp: March 29, 2023, 06:26:28 am
content: I also find a consistent problem with Arduino has been the lack of a debugger/programmer.The Arduino forums have lots of inquiries about people who have bricked their board, usually because they lost the bootloader.So without a method to reload it the board it is uselessLong time ago had this happen with Uno, but of course that these days is easily fixed, it wasn't always that way and the forums were full of people having that problem.I recently had this happen with a SAMD21 Mini and there's no way out of it, unless you have the Atmel ICE.It worked once only, when I changed the LED blink to a different time. Yes I double clicked it.I see on their forum many users have had this "worked once problem" with SAMD21 boards.So now do not use anymore Arduino boards in projects unless I have a way to recover the board.I see there are users with bricked Portenta H7 boards on the Arduino forum with no answer.I have checked some of the usual suppliers and the Renesas ICE For the RA4M1 is not available and if it is its $700+.Mr PJRC is a smart guy, has mostly taken care of this and the Teensy forum is not full of people who bricked their board, he uses a separate boot chip.Lets see how many users with bricked Uno Rev4 come up on the Arduino forums.

author: ataradov
author_rank: Super Contributor
timestamp: March 29, 2023, 06:32:23 am
content: You can use any generic debugger, it is just a standard ARM device. You can make one from PiPico for $4. And it is impossible to brick PiPico.The issue of recovering the device is pretty well solved nowadays. Times of expensive debuggers is long gone, if you are paying more than $15 for a debugger, you are being ripped off, unless you have some special requirements for tracing and all that stuff.

author: Kerlin
author_rank: Regular Contributor
timestamp: March 29, 2023, 06:34:21 am
content: Thanks will look at that PiPico solution.

author: ataradov
author_rank: Super Contributor
timestamp: March 29, 2023, 06:37:10 am
content: Quote from: Kerlin on March 29, 2023, 06:34:21 amThe official firmware from RPi -https://github.com/raspberrypi/picoprobe,my version -https://github.com/ataradov/free-dapBoth do the same thing, both follow the same protocol as Atmel-ICE (with exception for some Atmel specific things, which are needed for AVRs).Also, RPi recently released a new debugger hardware -https://www.raspberrypi.com/products/debug-probe/. It runs picoprobe firmware. And it has a chance to be a common "default" debugger probe for the community. It is cheap enough and if you don't want to pay even $12, you can make one for $4.

author: ppTRN
author_rank: Regular Contributor
timestamp: March 29, 2023, 06:37:52 am
content: Beside, the presence of the ESP32-S3, beside his connectivity, will cast a shadow on the RA4M1, way superior in term of specs. So why both? One could have got away with just the ESP32-S3

author: RoGeorge
author_rank: Super Contributor
timestamp: March 29, 2023, 06:44:05 am
content: Quote from: Kerlin on March 29, 2023, 06:26:28 amAFAIK for UNO it is possible to use another working Arduino as a ISP programmer to program/recover a bricked one. I assume this should be possible for SAMD21, too.My UNO clones have a ISP connector with populated 2x3 pins for ISP. They were $11 each in 2015, with an USB cable and a 320x240 2.4'' touch screen TFT w uSD shield included, and free shipping.

author: PCB.Wiz
author_rank: Super Contributor
timestamp: March 29, 2023, 07:38:02 am
content: Quote from: RoGeorge on March 29, 2023, 05:37:03 amHard to say, the rendered image seems to show a DFN20 ? package, for USB serial link, which is an unusual package.The other vendors Renesas Boards for the same MCU show a 'proper' Segger debug link silicon (in larger packages).Does anyone have ideas on what that DFN20? package by USB might be ? Or is the render 'inaccurate' ?

author: RoGeorge
author_rank: Super Contributor
timestamp: March 29, 2023, 07:56:30 am
content: Offtopic: "does it have?", not "does it has?", sorry.

author: MLXXXp
author_rank: Frequent Contributor
timestamp: March 29, 2023, 06:05:01 pm
content: Quote from: brucehoult on March 29, 2023, 01:55:28 amDoes it? For the Cortex M4, the FPU is optional. I can find no mention that the Renesas RA4M1 has an FPU. It's designated as having a Cortex M4, not an M4Fhttps://developer.arm.com/documentation/ddi0439/b/Floating-Point-Unit

author: PCB.Wiz
author_rank: Super Contributor
timestamp: March 29, 2023, 07:21:44 pm
content: Quote from: MLXXXp on March 29, 2023, 06:05:01 pm?The data says■ Arm Cortex-M4 Core with Floating Point Unit (FPU) Armv7E-M architecture with DSP instruction set

author: SiliconWizard
author_rank: Super Contributor
timestamp: March 29, 2023, 08:31:32 pm
content: Yes that is on the feature page of the datasheet (page 2):QuoteNote that while indeed Cortex-M4 doesn't necessarily come with a FPU, and the common naming with a FPU would be M4F, I've personally never run into any MCU which was M4-based and without a FPU.If someone has a reference for such an odd beast, I'll be curious to see it.(I'm sure that will be an invitation for some to look for one and try to prove that is it actually very common.)

author: brucehoult
author_rank: Super Contributor
timestamp: March 29, 2023, 09:07:11 pm
content: Quote from: MLXXXp on March 29, 2023, 06:05:01 pmI did check the Renesas datasheet before saying that.https://www.renesas.com/us/en/document/dst/renesas-ra4m1-group-datasheet?r=1054146

author: ataradov
author_rank: Super Contributor
timestamp: March 29, 2023, 09:16:42 pm
content: Quote from: SiliconWizard on March 29, 2023, 08:31:32 pmIt is pretty easy and not even an obscure old device - STM32WL have no FPU. I guess they decided that wireless stuff does not need floating point and decided to shave off a few cents.I've been monitoring availability of R7FA4M1AB3CFL on Mouser. And initially they had 5 in stock and 300+ on order. Now they have 18 in stock. Did they just find 13 random devices laying around?

author: PCB.Wiz
author_rank: Super Contributor
timestamp: March 30, 2023, 12:01:29 am
content: Quote from: ataradov on March 29, 2023, 06:37:10 amLooks good.Quote from: ataradov on March 29, 2023, 06:37:10 amHmm, strangely, they only connect 2-Debug pins and ignore SPI/JTAG options, which is a big shortfall for it to ever become "a common "default" debugger probe for the community."I like the look of the CH347, which has HS-USB and TSSOP20 package, and has 2 serial pathways, tho it is still somewhat niche.https://www.tindie.com/products/johnnywu/ch347-development-board/

author: ataradov
author_rank: Super Contributor
timestamp: March 30, 2023, 12:34:17 am
content: Quote from: PCB.Wiz on March 30, 2023, 12:01:29 amWell, it is mostly for ARM devices, so reducing pin count and only supporting SWD is a fair trade. If Arduino manages to move a lot of people to that board, then It would be more relevant, of course.But other than that, there are a ton of options. So many that it is hard to enumerate them all.The problem with all those WCH devices are weird proprietary drivers. And full PiPico is still cheaper and will support full JTAG.

author: Kerlin
author_rank: Regular Contributor
timestamp: March 31, 2023, 12:24:07 am
content: Quote from: ataradov on March 29, 2023, 06:37:10 amGood work. Live long and prosper my friend.RoGeorge no you cant do that with a SAMD21 Mini. And I did say, for the Uno - "I know its easier now"-V V V

author: ataradov
author_rank: Super Contributor
timestamp: June 26, 2023, 04:20:27 pm
content: The boards have been released. The stickers were hiding a field of LEDs. Meh.But I ordered the minimal one, we'll see how that Renesas MCU looks like.On the Wi-Fi one there is not even SWD connector. The programming pins are connected to the ESP32.And USB pins go simultaneously to both. There are actually muxes too, but none of the parts are marked DNP, so who knows what is on the actual boards.

author: RoGeorge
author_rank: Super Contributor
timestamp: June 26, 2023, 04:35:53 pm
content: This year's Arduino IDE 2 has hardware debugging support (though they removed the internal offline docs and help, which used to be very convenient to have in Arduino IDE 1). Not any Arduino devboard can use the hardware debugger from the IDE v2.Does the Arduino v4 have a debugger?

author: ataradov
author_rank: Super Contributor
timestamp: June 26, 2023, 04:45:30 pm
content: Nope. No debugger on a minimal one. ESP32 may act as a debugger, but I don't know if they implemented any support for it.Also, no CAN transceivers on the board.

author: firewalker
author_rank: Super Contributor
timestamp: June 26, 2023, 05:04:11 pm
content: One advantage of UNO was that the use of a simple mcu allowed users to start programing it using plain C fairly easy. Now with a 32 bit mcu...Alexander.

author: ataradov
author_rank: Super Contributor
timestamp: June 26, 2023, 05:12:34 pm
content: If you are using Arduino APIs, it is just as easy.

author: firewalker
author_rank: Super Contributor
timestamp: June 26, 2023, 05:25:52 pm
content: With Mega328 and gcc someone could in 5 minutes start poking to registers and learn something else. I bet that the datasheet for this mcu is at least 10x bigger and you will need a couple of hours just to set up the environment.The UNO name scheme always suggested something fairly simple.Alexander.

author: asmi
author_rank: Super Contributor
timestamp: June 26, 2023, 09:08:02 pm
content: The most important question is - did they fix the header offset? Or turned the bug into a feature?

author: brucehoult
author_rank: Super Contributor
timestamp: June 27, 2023, 12:06:34 am
content: Quote from: asmi on June 26, 2023, 09:08:02 pmAnd have all the hundreds of existing shields not fit?

author: westfw
author_rank: Super Contributor
timestamp: June 27, 2023, 06:22:45 am
content: I am pleased at the "reasonable" prices.Sure, not as cheap as a "clone" or a Pico, but consistent with Arduino's historical "low end" pricing.

author: ArdWar
author_rank: Frequent Contributor
timestamp: June 27, 2023, 08:04:40 pm
content: Quote from: asmi on June 26, 2023, 09:08:02 pmThat indeed ends up as a feature. With a proper on-grid headers, people can fit shields backward if they try to. With the offset they have to try ever so slightly harder.

author: mikerj
author_rank: Super Contributor
timestamp: June 27, 2023, 09:09:55 pm
content: Quote from: ataradov on June 26, 2023, 04:20:27 pmMeh indeed, it's utility seems limited after you are done making pretty patterns but I suppose it was a cheap option. A small LCD or OLED type display would have been much more useful but more $$.

author: PCB.Wiz
author_rank: Super Contributor
timestamp: June 27, 2023, 10:45:35 pm
content: Quote from: mikerj on June 27, 2023, 09:09:55 pmIt seems to be seeded by the micro:bit which is big in education and has a 5x5 LED matrix.Given Renesas now has a considerable investment here, I'd expect they want to chase the education exposure market.I wonder how that Uno 12 x 8 LED array would work as a decimal readout, with a translucent overlay ?Could support 8 'digits' and an additional 16 status / decimal point / range indicators ?

author: brucehoult
author_rank: Super Contributor
timestamp: June 28, 2023, 01:38:39 am
content: Quote from: PCB.Wiz on June 27, 2023, 10:45:35 pmIf you want to replace micro:bit then there is this:https://www.sparkfun.com/products/17597The Uno R4 is cheaper, but the Dr Who board comes with other hardware, a book, and has a micro:bit compatible connector.Bare board:https://www.sparkfun.com/products/17596

author: Picuino
author_rank: Super Contributor
timestamp: June 28, 2023, 09:01:41 am
content: I join this threadEdit:https://store.arduino.cc/products/uno-r4-minimahttps://store.arduino.cc/products/uno-r4-wifi

author: Ed.Kloonk
author_rank: Super Contributor
timestamp: June 28, 2023, 09:35:02 am
content: Is there enough power to turn that LED array into a scrolling text display?CPU power, I mean. The hacker in me would only find the LEDs useful for spewing out error msgs.

author: brucehoult
author_rank: Super Contributor
timestamp: June 28, 2023, 09:57:46 am
content: Quote from: Ed.Kloonk on June 28, 2023, 09:35:02 amOf course. Even an AVR is powerful enough to animate thousands of LEDs at update rates above human perception.

author: Picuino
author_rank: Super Contributor
timestamp: June 28, 2023, 10:35:02 am
content: The led matrix has a rather bizarre connection.https://docs.arduino.cc/resources/datasheets/ABX00087-datasheet.pdf

author: Ed.Kloonk
author_rank: Super Contributor
timestamp: June 28, 2023, 10:40:28 am
content: I wish they'd strived for a little LCD instead.

author: liaifat85
author_rank: Regular Contributor
timestamp: June 28, 2023, 11:34:47 am
content: I hope ML projects will be easier now.

author: brucehoult
author_rank: Super Contributor
timestamp: June 28, 2023, 12:03:39 pm
content: Quote from: Picuino on June 28, 2023, 10:35:02 amIf you were following this thread you'd already know what is going on there :-)https://www.eevblog.com/forum/beginners/how-to-connect-a-7-segment-2-5-digit-module-with-only-5-legs

author: bookaboo
author_rank: Frequent Contributor
timestamp: June 28, 2023, 12:23:07 pm
content: The Renesas sales team must be good, the ESP32-S3 has more than enough specs to be the sole processor in this application. Not to mention USB JTAG on board.

author: ArdWar
author_rank: Frequent Contributor
timestamp: June 28, 2023, 12:54:15 pm
content: Quote from: bookaboo on June 28, 2023, 12:23:07 pmHow absurd that will be if there's an onboard debugger? With Renesas that'll probably a RA4M2, the same as one used in their JLink-OB which is a cortex M33 core....The one actually "usable" by user ends up being the weakest core in the whole board. Kind of weird for a non manufacturer-subsidized devkit (supposedly)The whole thing reminds me of this

author: AndyBeez
author_rank: Frequent Contributor
timestamp: June 28, 2023, 02:01:51 pm
content: I had not noticed thisturd, but thanks to this thread I did. I thought Arduino had OLED and touch screen shields, a decade ago? Did a team of marketing executives throw a Raspberry Pi, a BBC Micro:bit and the ESP32 derivates into a feature blender and conceive their very first single board 'love child'? Ultimately, this looks like a consequence of lockdown, chipageddon and a brand that has lost its direction.+EDIT: Yes they have decent after market display shields ...Adafruit NeoPixel Shield for Arduino - 40 RGB LED Pixel Matrixhttps://www.adafruit.com/product/1430Adafruit 1.8" Color TFT Shield w/microSD and Joystickhttps://www.adafruit.com/product/802

author: xrunner
author_rank: Super Contributor
timestamp: June 28, 2023, 03:06:30 pm
content: Quote from: AndyBeez on June 28, 2023, 02:01:51 pmI don't get it either. I'm doing a small project right now and I have a small OLED screen right there on my bench where the Mega board is, so I don't have to use the serial link on my computer across the room to see what readings I'm dealing withPut a small OLED display on the UNO 4 board where the LED array is and if nothing else you have a debugging display right there where it's convenient.

author: PCB.Wiz
author_rank: Super Contributor
timestamp: June 28, 2023, 06:35:01 pm
content: Quote from: xrunner on June 28, 2023, 03:06:30 pmIt may be as simple as price and reliability/ruggedness ?Lcsc have LED from $0.0017 ! ( 1M + in stock, for one part code)

author: tszaboo
author_rank: Super Contributor
timestamp: June 28, 2023, 07:30:44 pm
content: OK, so I've been thinking about the odd choice for the microcontroller (amongst other things). And I have to conclude that there aren't that many Cortex M3 or M4 MCUs that would work from 5V. They clearly wanted to keep the compatibility with their ecosystem of boards. And after doing a search, you only get a few Cortex M4 parts with 5V, some NXP (expensive ones though), some Infineon parts (Insert vomit emoji) and some parts that come from the smaller makers.If they would accept a cortex M0, then there is the SAM C21, probably much better choice,

author: ataradov
author_rank: Super Contributor
timestamp: June 28, 2023, 07:47:02 pm
content: This is not how Arduino works. They don't just select the device as a regular project would. They have enough of a pull that the can talk to the vendors. This time Renesas wanted to play ball. You can assume that they are getting the parts at a huge discount, possibly at or below the cost. It is also possible that Renesas initiated the design in a first place.

author: SiliconWizard
author_rank: Super Contributor
timestamp: June 28, 2023, 08:09:11 pm
content: Yep, when you have that kind of traction, vendors will knock on your door constantly. For them that's good marketing, even if they don't target hobbyist markets.

author: tszaboo
author_rank: Super Contributor
timestamp: June 28, 2023, 08:35:15 pm
content: Quote from: ataradov on June 28, 2023, 07:47:02 pmYou would think, but then again, how many suppliers would run a design of their choice on a completely different node for them? There is a reason generally a microcontroller doesn't run on 5V anymore. Getting into the Arduino ecosystem would be a big deal, but not that big that you roll an entire series with different transistors in it. Judging by the fact they sold 10M Unos in about 10 years the numbers are not that high. And while a lot of products ended up using an ATMEGA328 because it's on the Uno, this is not 2010 anymore. There are just so many compatible boards with it, and not to mention the fact the parts are going to be unobtanium from Renesas anyway. They have like 5K pieces as global stock?

author: ataradov
author_rank: Super Contributor
timestamp: June 28, 2023, 08:50:14 pm
content: Quote from: tszaboo on June 28, 2023, 08:35:15 pmThey are using an existing device, nobody is making new silicon.Quote from: tszaboo on June 28, 2023, 08:35:15 pmFor the IC vendor getting into the Arduino ecosystem, especially as a primary mainstream board is huge. Sales to Arduino do not matter, sales that it generates after that are significant.Quote from: tszaboo on June 28, 2023, 08:35:15 pmWell, they would have to work on the inventory if the boards become popular.

author: tszaboo
author_rank: Super Contributor
timestamp: June 28, 2023, 08:53:58 pm
content: Quote from: ataradov on June 28, 2023, 08:50:14 pmThen I don't get your point at all. I was saying there is a limited selection of 5V MCUs with Cortex M4 or similar cores, and only like 3 or 4 vendors total to select from.

author: ataradov
author_rank: Super Contributor
timestamp: June 28, 2023, 08:57:18 pm
content: Yes, there is a limited selection. They selected one of them. I don't see an issue here.All I'm saying is that SAM C21 is not a better option because nobody was selling them to Arduino at cost.

author: PCB.Wiz
author_rank: Super Contributor
timestamp: June 28, 2023, 10:02:37 pm
content: Quote from: ataradov on June 28, 2023, 07:47:02 pmYes, you are very close.Renesas are clearly motivated here and $10M helps buy you considerable influence too.I see it as a smart move.This news helps explainhttps://www.renesas.com/us/en/about/press-room/renesas-announces-investment-popular-open-source-company-arduino-access-huge-developer-community"Renesas is investing $10 million into Arduino’s Series B round of $32 million"

author: PCB.Wiz
author_rank: Super Contributor
timestamp: June 28, 2023, 11:16:20 pm
content: Quote from: tszaboo on June 28, 2023, 07:30:44 pmYou are broadly correct, but there is also Nuvoton (like their M471R1E6AE, tho that has no DAC ) and ToshibaA recent Toshiba example (June 26, 2023)https://edacafe.com/nbc/articles/1/2013201/Toshiba-Introduces-ARM-Cortex-M3-Microcontrollers-TXZ+TM-Family-Advanced-Class-with-1MB-Code-Flash-Memory-Supporting-Firmware-Updates-without-Interrupting-Microcontroller-Operation

author: ArdWar
author_rank: Frequent Contributor
timestamp: June 28, 2023, 11:48:27 pm
content: Quote from: PCB.Wiz on June 28, 2023, 11:16:20 pmThere's also NXP Kinetis KE series. I don't think it isthatexpensive. Still fairly normal price range IMO.Not that any alternatives matter when they're already captured in by sponsorship.

author: westfw
author_rank: Super Contributor
timestamp: June 29, 2023, 02:19:43 am
content: Quote from: ataradov onTodayat 01:57:18 pmI suspect most of the problem is that Microchip was having pretty serious supply-chain issues. SAMC's ordered now are being scheduled for delivery in a year. :-( None of them have native USB, either.Atmel used to look pretty tight with Arduino, but perhaps Microchip is not so cooperative (few of the "new" AVRs have shown up in Arduino-class products, and the vendors seem to be converting to ... chips they can actually buy. (rp2040, ESP, etc.) (and PIC32 never showed up in many such boards, either.)Renesas is a bit of a surprise; I don't recall them ever being inclined to servicing the "hobbyist market."For Arduino, these are pretty nice boards at a good price point. Less so compared to their younger competitors, but still...

author: ppTRN
author_rank: Regular Contributor
timestamp: June 29, 2023, 04:19:24 pm
content: I was so disappointed by the led matrix that I rage-bought a Raspberry Pi pico W.Jokes aside, Renesas and RA world is pretty new for me so i look forward to dive into it's architecture, and surely the new Arduino UNO will be very helpfull.It is clear that I am refering to a pure "accademical" view of thingsBeside, since ESP32 pins are not available exept for the test points, why not driving the led matrix with it?

author: Rudolph Riedel
author_rank: Regular Contributor
timestamp: June 29, 2023, 06:34:44 pm
content: I received an Arduino UNO R4 MINIMA today and tried it with my EVE library which uses SPI for a TFT.And the first results are terrible.Just using spi_transmit(uint8_t data) the same code runs almost five times faster on the R3 as it does on the R4.The logic analyzer trace reveals that there are 11µs pauses between SPI transfers on the R4 while the R3 has 1µs...2µs pauses.The R4 SPI class is generic code and the comments date it to 2014 - and there is no DMA support.The actual transfers happen in a binary blob called libfsp.a for which the source code is not provided in ArduinoCore-renesas.The driver is probably running on highly generic code from Renesas with lots of runtime sanity checks.

author: ataradov
author_rank: Super Contributor
timestamp: June 29, 2023, 06:39:56 pm
content: FSP source is herehttps://github.com/arduino/fsp/tree/8ec537bc86b1b71203d72d0cbb28e6e75b353ebdBuild instructions are herehttps://github.com/facchinm/ArduinoCore-renesasI would expect them to work on that a lot in the coming months. If they decide to stick with the Renesas libraries, then this board is as good as dead for general public. And I'm afraid Renesas would insist on that.The code seems to be a typical bloatware, probably made worse by Arduino wrapping it into C++ classes. They would have to move all of that into native code.

author: ataradov
author_rank: Super Contributor
timestamp: June 29, 2023, 07:00:38 pm
content: Their CMSIS pack does not have any include files. LOL. You have to go though some convoluted process of installing that FSP. At least there is SVD file, so you can just generate the header file.This is getting stupider and stupider. Arduino may be in trouble here.

author: SiliconWizard
author_rank: Super Contributor
timestamp: June 29, 2023, 08:16:43 pm
content: Sounds fun.

author: Rudolph Riedel
author_rank: Regular Contributor
timestamp: June 29, 2023, 08:24:44 pm
content: Ah, thank you, I only found the configuration for E2 Studio in ArduinoCore-renesas and believed I would need that to generate the actual source code.The r_sci_b_spi.c alone should help getting around the Arduino SPI class to speed things up, now I do not have to rely on the user manual alone.I would like to go bare metal on the RA4M1, just for fun.At least having an Arduino core allows to do that with selected parts.And this will be more fun when there is a PlatformIO package for the R4, I do not have hope though that there will be support for anything else than Arduino.Updates in the coming months? I would be rather surprised by that.DMA is still an alien concept for Arduino.And hey, for the average user the SPI class works as it is, SPI is only used to send a couple of bytes and nobody is looking at logic analyzer traces...

author: ataradov
author_rank: Super Contributor
timestamp: June 29, 2023, 08:50:07 pm
content: Quote from: Rudolph Riedel on June 29, 2023, 08:24:44 pmI'll be doing that some time soon. I ordered the board to be delivered to the office, but did not take into account Jul 4th weekend, so unless it arrives tomorrow, I'll only be able to get it late next week.Quote from: Rudolph Riedel on June 29, 2023, 08:24:44 pmThey don't have to expose it to the users via official API, but it should be transparent if SPI uses it internally.Quote from: Rudolph Riedel on June 29, 2023, 08:24:44 pmThis is true until you start connecting displays. And when your refresh rate drops 5x times, you will notice.

author: tszaboo
author_rank: Super Contributor
timestamp: June 29, 2023, 09:47:50 pm
content: Quote from: PCB.Wiz on June 28, 2023, 10:02:37 pmThat would explain the choice.Quote from: westfw on June 29, 2023, 02:19:43 amThe native USB is a bit of a mixed bag. I often times end up soft locking the MCUs with that, if your code crashes fast before the USB would enumerate on the PC. The native USB bootloader in the RP2040 is great, that prevents this from happening. Also, the dedicated serial port keeps on working if you reset. It's a bit of a choice, for some projects the USB is good, but most of the times I prefer a converter.The price point is OK I guess for a board from them. There are several Nucleo boards that are cheaper, and they come with STLINK, the IDE and the code for them can be the same... Or the Pi Pico W at 1/3rd the price. The Raspberry guys really undercut everyone.

author: SiliconWizard
author_rank: Super Contributor
timestamp: June 29, 2023, 10:21:32 pm
content: Quote from: ataradov on June 29, 2023, 08:50:07 pmI'm not familiar with Arduino, but how can DMA be really transparent (and still be useful)?SPI could use DMA internally to handle transfers, but the whole point would then be than the transmit calls would *not* be blocking, and you'd need some API to get notified that a transfer has completed, either by polling, but ideally via an interrupt. So if the Arduino libraries have no concept at all of DMA, I'm not sure how that could work. But I'm curious to know how that would be done.

author: ataradov
author_rank: Super Contributor
timestamp: June 29, 2023, 10:47:07 pm
content: Quote from: SiliconWizard on June 29, 2023, 10:21:32 pmIt is fine for them to be blocking, since Arduino APIs are blocking.The issue here is that they are transmitting byte by byte and there are so many abstraction layers and checks between each byte that a transfer of a solid block would take a long time with huge inter-byte delays. You can either optimize the code to not be so slow, or just use DMA.

author: westfw
author_rank: Super Contributor
timestamp: June 29, 2023, 11:07:17 pm
content: QuoteWhy do you say that? the license looks pretty generic for vendor libraries ("only use our libraries on our chips")The latest STM32 Arduino stuff is all based on the ST libraries. It's an "interesting" trade-off. Clearly slower and more bloated than (say) the Maple stuff (which went "way too far" in the ST-less direction, apparently due to perceived licensing issues), but also much faster to get new boards running, and runs on a much broader set of boards as a result.ESP, Nordic, and anything else with IoT capability, Arduinos all run on top of their SDKs (and sometimes RTOSes), to varying degrees of pain. Apparently pretty much a requirement to get radio code.

author: westfw
author_rank: Super Contributor
timestamp: June 29, 2023, 11:11:31 pm
content: Here are some comments I made elsewhere:Hardware:Good: M4F CPU.Bad: The main "user" Serial port (pins 0/1) uses an SCI without a FIFO. (only SCI0 and 1 have FIFOs.)Software:Mostly built on top of the Renesas FSP libraries. Some of that is typical bloatware, some seems sort-of OK. (DigitalWrite() isn't too bad...)"Blink" compiles to 33k. ADC and Timer code use floating point, and either are not careful about using single precision FP or explicitly use double (!).Here are the big pieces of code (NOT including the DPFP functions):Code:0000690d 00000100 T cdcd_xfer_cb00007165 00000108 T dcd_event_handler0000a935 0000011c T can_rx_isr00006aab 00000120 t _tu_fifo_peek_n00009999 00000120 T iic_slave_rxi_isr0000aaf5 00000120 T R_AGT_Open0000804d 00000128 T dcd_edpt_open00009ec1 00000138 T iic_master_rxi_isr0000b101 0000013c T R_ADC_Open0000467d 00000150 T SystemInit00004809 00000154 T FspTimer::begin(e_timer_mode, unsigned char, unsigned char, unsigned long, unsigned long, e_timer_source_div, void (*)(st_timer_callback_args*), void*)0000495d 00000158 T FspTimer::set_period_counts(float, unsigned long)00006239 0000016c T __SetupUSBDescriptor()00009115 0000017c T sci_uart_rxi_isr00006c01 0000017e t _tu_fifo_write_n.part.000009ccd 00000190 t iic_master_open_hw_master.isra.00000ae79 00000190 T R_ADC_ScanCfg00009589 000001a0 T sci_i2c_txi_isr0000899d 000001e0 T hidd_control_xfer_cb0000a461 0000026c T R_GPT_Open000082bd 00000494 T dcd_int_handler00007431 000005a8 T tud_task_ext00005031 00000894 T IRQManager::addPeripheral(Peripheral_t, void*)R_* functions are fsp (also available athttps://github.com/renesas/fspBTW) Also SystemInit and some of the ISRs, I think.C++ code is from Arduino.a lot of that is USB code (tud_*, dcd*, etc). Arduino loads USB to enable auto-reset/upload even if the user's code does not communicate.I dunno what's going on with IRQManager. That code looks weird and unnecessary.

author: westfw
author_rank: Super Contributor
timestamp: June 30, 2023, 12:06:50 am
content: QuoteClearly for a tft, you want to be usingArduinoSPI::transfer(void *buf, size_t count)writing a single byte calls the fsp function to write/read a buffer, with a single byte in it.I find it pretty educational how each time the Arduino core is ported to a new platform, there show up "design decisions" (either in the original code, or in the decisions about which pieces that "need" to be backward compatible.)The most trivial example is the way AVRs enable pullups by writing a 1 to the port output register while the port is in input mode. Boy is that a PITA on ARMs where pullups are controlled by a separate register, so you have to check in digitalWrite whether the port is in Input mode (itself frequently "complex"), and then manipulate the pull registers. Sigh.WRT SPI, I find it obnoxious that the library does not implement "unidirectional" transfers.

author: ataradov
author_rank: Super Contributor
timestamp: June 30, 2023, 12:13:03 am
content: Quote from: westfw on June 29, 2023, 11:07:17 pmBecause if this is driven by the corporate, you will soon start hearing about converting Arduino users to "paying customers" and all sorts of talks and presentations on how to migrate your Arduino "prototype" to a real project. And in the eyes of the managers and sales, it usually involves using their libraries.This is assuming the board is in any way successful, which is far from guaranteed.

author: westfw
author_rank: Super Contributor
timestamp: June 30, 2023, 12:29:17 am
content: I still don't understand. Isn't that one of theadvantagesof all Arduino-like boards, that you can "convert your application to a real project"? For "pros", certainly, but it's one of the attractions even for amateurs: "I can replace my Arduino xxx with just a bare chip on a custom board, right?" 3D printers are a swell example.(that said, I see a scary number of "real projects" with embedded Nano Clones.)

author: ataradov
author_rank: Super Contributor
timestamp: June 30, 2023, 12:47:09 am
content: Quote from: westfw on June 30, 2023, 12:29:17 amThat does not lock you in into the vendor ecosystem. It also makes support harder for company FAEs in case of issues. Nobody wants to support and figure out bugs in Arduino code.There are complicated dynamics in all of this and a lot of stuff I can't talk about.

author: Ed.Kloonk
author_rank: Super Contributor
timestamp: June 30, 2023, 09:52:43 am
content: Quote from: brucehoult on June 28, 2023, 12:03:39 pmWhilst I couldn't easily find in 5 minutes how to poke the display to show two digits representing temperature in Celsius using an older code base, how do you even make use of this if you are also using a shield or two?

author: ppTRN
author_rank: Regular Contributor
timestamp: June 30, 2023, 10:42:22 am
content: I do not really think that the arduino ecosystem is still pushing for shields. I myself have not used one in ages and i have not really saw any new stuff in the market in a while, so i think that we are moving to a shieldless board (But if so, why so many importance to the form factor of the new board?).But sure if you want to use one i guess the LEDs will be obscured

author: AndyBeez
author_rank: Frequent Contributor
timestamp: June 30, 2023, 11:11:12 am
content: So ask yourself, what market segment is this targetted at? It seems too complex for complete newbies, even with the 'girlie' luv heart, but too under spec'd for experienced makers. Maker's who are used to the full Linux stack. But at under $30 these will sell to STEM clients, needing to replace units the kids bricked last semester.

author: brucehoult
author_rank: Super Contributor
timestamp: June 30, 2023, 11:46:23 am
content: Quote from: ppTRN on June 30, 2023, 10:42:22 amI've never bought a shield, but I've used a few of these...https://www.freetronics.com.au/collections/protoshields

author: madires
author_rank: Super Contributor
timestamp: June 30, 2023, 01:23:30 pm
content: Quote from: westfw on June 29, 2023, 11:11:31 pmOuch!Quote from: PCB.Wiz on June 28, 2023, 10:02:37 pmThat explains a lot! Renesas are not known for being especially hobbyist/maker-friendly. I wouldn't use any of their MCUs for a non-commercial project.

author: Rudolph Riedel
author_rank: Regular Contributor
timestamp: June 30, 2023, 03:12:06 pm
content: Quote from: westfw on June 30, 2023, 12:06:50 amI would prefer to use a SPI class that supports DMA like the one that is implemented for the Teensy 4.You define a EvenResponder, attach a callback function to it and call SPI.transfer(read-from, write-to, count, event).And "write-to" can be NULL.My transfer function sets CS to low, sets a flag, calls SPI.transfer().My callback function clears the flag and sets CS to high.This is completely non blocking, at least as far as what the controller core is doing.My comparision was R3 to R4 and on the R3 there is not enough memory for my buffer.But as I have the code in place to use a buffer I made the R4 use it and called SPI.transfer(buffer, count).And it still is slower as the R3.In my example code I am sending 228 bytes for a display refresh.And the time just for this between chip-select low to chip-select high is:R3: 524µsR4: 643µsAnd the time for the R3 includes everything that needs to be done to prepare the data as everything is send directly with SPI.transfer(uint8_t) whilefor the R4 this is just sending the buffer.QuoteI wonder what the point is in using a modern controller and then ignoring some of the features like DMA.QuoteNow that you mention it, this should be exactly the issue with the R4 running slower than the R3 even when using a buffer.My abstraction layer has spi_transmit() and spi_receive() functions and spi_transmit() is ignoring the return value from SPI.transfer(),heck I am normally not even using the SPI class for the AVR and do not even read SPDR after the transfer, but I wanted to give the R4 a fair comparision.So the R4 is writing back the whole buffer even though that I do not need any of it.

author: ataradov
author_rank: Super Contributor
timestamp: July 01, 2023, 03:47:21 am
content: I've actually got the board today, so I started to work on the support for this MCU in my programming tools. A couple more things became apparent:1. This device does not seem to have any sort of Device ID register that debugger can use for detection and sanity checking before destructive operations. I've seen some strange identification schemes, but not having one at all is a new one.2. They use 8-, 16- and 32-bit registers not aligned at a 32-bit boundary. This is just sad.And actually it looks like there are no 32-bit registers, only 8- and 16-.The lack of any sort or ID registers made me think of how the firmware would identify the device for errata identification and workaround purposes. Well, I can't even find an errata document.They for some reason have errata for the datasheets and reference manuals. Why? Just fix the document. According to the revision history there was only one revision for both the datasheet and the RM since 2019. I guess they just decided that the documents were perfect as is.I'm rapidly losing any interest in in this device. It just looks bad anywhere I look. I'm failing to find anything interesting about it, all I see is pretty sub-par so far.

author: SiliconWizard
author_rank: Super Contributor
timestamp: July 01, 2023, 05:54:44 am
content: That would be a good reason they would have "sold" it at probably a very interesting unit price to Arduino.

author: ataradov
author_rank: Super Contributor
timestamp: July 01, 2023, 06:10:42 am
content: Yes, it feels like they are trying to offload some duds. Marketing-wise this does not make sense because it only solidifies common belief that Renesas parts are not that great for small scale use.If Arduino software gets optimized eventually, it might be fine for them. But this would not help the narrative that 32-bit MCUs are harder to use bare-metal. This one would be pretty hard, documentation is not great. It is all over the place and the document section structure is highly unusual.For some reason flash controller registers are not documented in the main document (although general functional description is in the main document). The flash controller has a separate document that applies to two different device series, but there is nothing in common between them. So, the document is just split in half describing them separately. It is bizarre, no idea why this was not just split and included in the relevant primary documents.A device that has been on the market for 4 years, but has no errata and only initial revision of the datasheet seems strange.

author: ArdWar
author_rank: Frequent Contributor
timestamp: July 01, 2023, 06:44:14 am
content: Dumping "unwanted" stock to hobbyist market sounds weird to me, unless this is some weird bait and switch strategy.This way they can't capitalize on it's success, and at worst end up extending its lifecycle

author: ataradov
author_rank: Super Contributor
timestamp: July 01, 2023, 06:53:29 am
content: I though that too. I doubt it is just a leftover stock, they must be actively manufacturing them. But it is possible that they are committed to manufacturing that part anyway for real customers. Automotive customers will not like their part being killed too soon. But there are no new customers because the part is objectively dated and bad, so they want to generate more sales for it.

author: brucehoult
author_rank: Super Contributor
timestamp: July 01, 2023, 07:08:19 am
content: Quote from: ArdWar on July 01, 2023, 06:44:14 amThey've got form here.Look at the Asus Tinker V, that uses a Renesas RZ/Five SoC that claims to have a RISC-V MMU and run Linux, but it seems that virtual addresses between 0x30000 and 0x4FFFF do not go through the MMU but are always direct mapped to SRAM "tightly integrated memory" at the same physical addresses. And is this an address range that statically-linked binaries from standard RISC-V toolchain blast right through.And they had the cheek to ask the entire RISC-V community to change TEXT_START_ADDR away from 0x10000 so as to not fail on their non-conforming CPU core.The proper solution would be to swap this 128 KB physical RAM space on process switch, along with the integer and FP registers and CSRs, on their CPU only.https://lore.kernel.org/all/CA++6G0Do001Bo+kxhUNz5T937TYU-K5Y43MH+X=Q2TgFCaxcfQ@mail.gmail.com/

author: westfw
author_rank: Super Contributor
timestamp: July 01, 2023, 07:30:07 am
content: QuoteIsn't that part of the CM4 (ARVv7m) architecture definition, rather than a vendor-provided thing?What is there at 0xE000ED00 and thereabouts?

author: westfw
author_rank: Super Contributor
timestamp: July 01, 2023, 07:45:16 am
content: (Or perhaps I'm thinking of the CoreSight (?) ROM table at 0xE00FF000- 0xE00FFFFF)(Vendors can be alarmingly blithe about omitting documentation that the consider "already covered" in the ARM documentation...)

author: PCB.Wiz
author_rank: Super Contributor
timestamp: July 01, 2023, 07:50:35 am
content: Quote from: SiliconWizard on July 01, 2023, 05:54:44 amArdunio are not alone, others have already backed this RA4M1 core :Seehttps://forum.micropython.org/viewtopic.php?t=12557saysThere is a new renesas-ra port which targets RenesasRA4M1, RA4W1, RA6M1 and RA6M2 MCUs, with board definitions for evaluation kits for these MCUs, along withRA4M1 clicker.This port currently supports Pin, ADC, SoftI2C, I2C, SoftSPI, SPI, UART, Timer and RTC classes in the machine module, along with the VFS and an internal flash filesystem.and the RA4M1 CLICKER includes a Debugger link.https://www.mikroe.com/ra4m1-clicker

author: ataradov
author_rank: Super Contributor
timestamp: July 01, 2023, 07:57:32 am
content: Quote from: westfw on July 01, 2023, 07:30:07 amCPUID is the core identification, it is the same for all cores of the same type and revision. So, all Cortex-M4 devices would have the same value.And ROM tables are also pretty pointless. They are mostly fixed for a given core. There are a lot of combinations of components in theory, but practical cores are all the same.

author: ataradov
author_rank: Super Contributor
timestamp: July 01, 2023, 08:08:09 am
content: The only way I see this device getting popular is if there is a viral effect where people decide to extract the most out of it. But the base device is so plain and uninteresting that I don't know if anyone would bother. ESP32 installed on the Wi-Fi version is way more interesting and high performance than this.

author: Rudolph Riedel
author_rank: Regular Contributor
timestamp: July 01, 2023, 08:37:22 am
content: It looks like the RA4M1 have identification registers, although it is a string.https://www.renesas.com/us/en/document/tcu/ra-family-addition-register-definition-flashIf have not tried yet to read from 0x01003C00+0x24 to check the RA4M1 string.This is not in the FSP, the includes that come with the Arduino core or the referenced user manual.The level of obfuscation is strong with this one, just the perfect product for open source development.Also check chapter 46 of the "Manual" for "Secure Cryptographic Engine (SCE5)" - there is nothing there.

author: ataradov
author_rank: Super Contributor
timestamp: July 01, 2023, 08:44:41 am
content: Quote from: Rudolph Riedel on July 01, 2023, 08:37:22 amAh, one of those random errata documents that lets you have one revision of the datasheet. This looks like other "erratas" that correct literal typos. This is the stupidest thing I've seen in a while.I'll try to read that location and we'll see what happens.Quote from: Rudolph Riedel on July 01, 2023, 08:37:22 amThis is pretty common. Export restrictions and such.

author: ataradov
author_rank: Super Contributor
timestamp: July 01, 2023, 08:54:52 am
content: Yes, this works.FMIFRT value is 0x01003c00. And part number reads as 'R7FA4M1AB3CFM ' (0x41463752 0x41314d34 0x46433342 0x2020204d).But I'm not really in the mood to hunt for all the "technical updates". This is a much bigger waste of time than I expected, so it would go into the drawer until I don't have more interesting projects.MCUVER reads as 2, so there must have been a couple revisions. Too bad there does not seem to be an actual silicon errata.

author: BrokenYugo
author_rank: Super Contributor
timestamp: July 01, 2023, 02:57:08 pm
content: Quote from: ataradov on March 29, 2023, 02:02:01 amYeah, I know there are a lot of official Arduino variants, but when I hear the word I think "Uno, Nano, or Mega?" That's what actually gets produced by third parties and dumped on the market by the ton, or at least that was the case last time I used one for something.

author: Rudolph Riedel
author_rank: Regular Contributor
timestamp: July 01, 2023, 03:59:51 pm
content: Quote from: Rudolph Riedel on June 30, 2023, 03:12:06 pmI just modified the Arduino SPI.cpp to use R_SPI_Write() for the buffer transfer instead of using R_SPI_WriteRead().R3: 524µsR4: 643µsR4 write only: 596µsSo nope, still bad.Checking out r_spi.c from the FSP library that can not be manipulated this conveniantly, R_SPI_Read(), R_SPI_Write() and R_SPI_WriteRead() are just wrapper functions for r_spi_write_read_common().And this one does not even transfer anything, it configures the SPI and calls r_spi_start_transfer() at the end.Then r_spi_start_transfer() finally shows that the buffer is transferred using interrupts.So looks like what slowing this down after the transfer finally got started is context switching.And btw, ArduinoSPI::transfer(uint8_t data) is using R_SPI_WriteRead() as well, only with a fixed length of 1.The attached logfile is not at all what I would expect.

author: westfw
author_rank: Super Contributor
timestamp: July 01, 2023, 06:03:39 pm
content: QuoteAre you setting the clock rate explicitly?Apparently the SPI clock defaults to 4MHz on an Uno R3, and 1MHz on an Uno R4... (?? Sigh.)

author: Rudolph Riedel
author_rank: Regular Contributor
timestamp: July 01, 2023, 06:23:37 pm
content: Quote from: westfw on July 01, 2023, 06:03:39 pmYes, I am setting it to 8MHz.

author: Rudolph Riedel
author_rank: Regular Contributor
timestamp: July 01, 2023, 07:33:56 pm
content: I modified the SPI class to use a register based busy loop for the buffer transfer.Code:void ArduinoSPI::transfer(void *buf, size_t count){_spi_cb_event = SPI_EVENT_TRANSFER_ABORTED;if (_is_sci) {_write_then_read(&_spi_sci_ctrl, buf, buf, count, SPI_BIT_WIDTH_8_BITS);} else {// _write_then_read(&_spi_ctrl, buf, buf, count, SPI_BIT_WIDTH_8_BITS);// _write(&_spi_ctrl, buf, count, SPI_BIT_WIDTH_8_BITS);#if 1uint8_t *buffer = (uint8_t *) buf;_spi_ctrl.p_regs->SPCR = 0x4a; /* enable, no irq, master, tx only */for(size_t index = 0; index < count; index++){_spi_ctrl.p_regs->SPDR_BY = buffer;asm volatile("nop");while (_spi_ctrl.p_regs->SPSR_b.IDLNF) {}}_spi_ctrl.p_regs->SPCR = 0xb9; /* off, interrupts, master, full duplex */#endif}#if 0for (auto const start = millis();(SPI_EVENT_TRANSFER_COMPLETE != _spi_cb_event) && (millis() - start < 1000); ){__NOP();}if (SPI_EVENT_TRANSFER_ABORTED == _spi_cb_event){end();}#endif}R3: 524µsR4: 643µsR4 write only: 596µsR4: register based busy-loop: 391µsThis is not optimal, when I remove the NOP the time goes down to 340µs, it stops working though as the last byteis not transferred.760ns between transfers is 36 clock cycles at 48MHz, hmm.Whatever, it is slow by default because the software from Renesas is slow and no effort whatsoever was put into the SPI class.Also note this:_spi_ctrl.p_regs->SPCR = 0x4a; /* enable, no irq, master, tx only */..._spi_ctrl.p_regs->SPCR = 0xb9; /* off, interrupts, master, full duplex */I only wanted to set / clear TXMD but when I read the register it did not only show the active interrupts, the SPI actually gets disabled.And there is no SPI.endTransaction() in my entire project.This is still bad for a 32 bit controller that has DMA support but at least this beats the R3 - only not by much when taking into account that the R4 spends 40µs+ to prepare the transfer which is included in the time for the R3.

author: eugene
author_rank: Frequent Contributor
timestamp: July 01, 2023, 09:59:39 pm
content: Quote from: BrokenYugo on July 01, 2023, 02:57:08 pmI hear what you're saying and get your point, but I'm not going to agree. There are dozens (at least) of variants that are NOT clones of Uno, Nano, or Mega that can be used in the Arduino ecosystem. Adafruit, Sparkfun, Teensy, to name just a few, but there are many more. And then IC manufacturers commonly make dev boards that are Arduino compatible to some degree. Dozens is probably an underestimate. There are likely hundreds of unique designs that can not only be programmed from within the official Arduino IDE, but make use of at least some of the libraries available, both "official" and second source.Honestly, I don't care about the Uno R4. There are so many better alternatives that it's hardly even worth thinking about. The exception *might* be educational purposes where a huge cabinet full of shields exists... Believe it or not, I see the LED matrix as also possibly being useful in an educational environment, but probably not outside the classroom even for hobby projects.If I want ESP32 there are cheaper and better alternatives. If I want Arm, there are better alternatives. We've already spent too much time discussing this classroom tool.

author: westfw
author_rank: Super Contributor
timestamp: July 11, 2023, 08:46:16 am
content: QuoteApparently Renesas did not want to take advantage of the additional NVIC vectors offered by v7m architecture, and has instead implemented something where 100+ interrupt sources must be mapped on to 32 NVIC slots. Sigh.It's not even clear whether you can map, say "ALL of the SPI interrupts" to a particular NVIC vector.I don't like the manual. :-(

author: Rudolph Riedel
author_rank: Regular Contributor
timestamp: July 11, 2023, 06:33:00 pm
content: I have this now:https://github.com/RudolphRiedel/ArduinoCore-renesas/tree/main/libraries/SPIWhich I might be putting in a pull-request for tomorrow.And on the way I found a crucial bit to be left undocumented in the user manual.The SPBYT bit in SPDCR has to be set in order for the SPI to do anything in 8-bit mode.And so far it is only documented by a "Technical Update" you need to find first as well.There are two additional 2 bit values in this register that are in the includes but not in the manual and there is no documentation for this.I lost a couple of hours trying to find the error in my code over this.In addition it was found when trying to use 32 bit transfers that the register SPDCR2 containing BYSW is missing from the manualand there also is no "Technical Update" for it.But if you do not set this bit then the bytes are transferred in the wrong order in 32 bit mode.The question is, what else is missing from that user manual and why did Renesas not fix any of this in the almost four years that user manual has been released?Renesas has been asked for an update on this.

author: westfw
author_rank: Super Contributor
timestamp: July 11, 2023, 11:48:41 pm
content: Quote from: ataradov on July 01, 2023, 01:44:41 amPerhaps. But the SCE5 is also said to include a "unique ID" and the "True Random Number Generator."They don't seem to be documented at all, anywhere, either!Has anyone tried to engage Renesas on any of these issues? It is a useful measure of a company, how they respond to questions...

author: Rudolph Riedel
author_rank: Regular Contributor
timestamp: July 13, 2023, 10:44:36 am
content: I was checking the datasheet and found that Renesas only specifies "1000" as the minimum Reprogramming/erasure cycles while not providing "Typ" or "Max" values.I am not sure what to make of this in context of using an Arduino board that I reprogrammed several times in the last days alone.

author: ataradov
author_rank: Super Contributor
timestamp: July 13, 2023, 03:21:29 pm
content: This is typical in automotive. At room temp and with no need for 20 years retention, this number will be 100-1000x higher. I would not worry abut that.I tested a couple devices that specified 10K erase cycles and they started to behave weird at over 1 million cycles. They probably would have stopped much sooner at low supply voltage and extreme temperatures.

author: Rudolph Riedel
author_rank: Regular Contributor
timestamp: July 13, 2023, 10:10:01 pm
content: I am not exactly worried and I definately would not be worried with a RA4M1 in a coffee maker or lawn mower which are two of the suggested applications.But I was planning on keeping that board and to reflash it over and over again. And I did so plenty of times over the past few days already.And if I mange to make it fail some day there will be no clear indication that the flash is the issue - that is a prospect I do not like.These chips are not automotive qualified but yes, at lower temperatures the data retention should be much higher, even when close to worn out.

author: SiliconWizard
author_rank: Super Contributor
timestamp: July 13, 2023, 10:17:16 pm
content: Quote from: eugene on July 01, 2023, 09:59:39 pmI personally don't care about the Arduino ecosystem, but for those who do, I agree with what you said here.Why even care about the official Arduino products when there are tons of better alternatives that are available and supported by the Arduino framework and tools?I know this may not be good for Arduino (the company)'s business itself, but I'm not involved in it whatsoever and have no reason for promoting it.Maybe one of the few reasons for considering the official Arduino boards is the idea that they'll be better supported than anything else claimed compatible. Doesn't seem to make a whole lot of difference in practice though from what I've seen. Another is to support the Arduino company, if you feel like it. Your choice.

author: ataradov
author_rank: Super Contributor
timestamp: July 13, 2023, 10:18:37 pm
content: You may be able to get to that very conservative 1K number. There is no chance you will get to the actual limit at room temperature and a stable 5 V supply.The flash issue is easily detected by adding verification after programming. I'm not sure if Arduino and its bootloader are doing that, but if it is a concern, it is something to look at.Unless you are just programing without interacting with the board, connectors and buttons would have shorter life span than the flash.And I don't know how perceivable it is with the Arduino IDE, but the first sign of wear is increased erase time. Programming will start getting slower. And if you programmed it 1000 times, you will notice it, unless Arduino is inefficient and erase/programming time is not the dominant part.

author: westfw
author_rank: Super Contributor
timestamp: July 17, 2023, 07:48:22 am
content: Sigh. Providing 20 user-accessible pins from a 64pin chip might be doing the whole "Uno R3 compatible" thing further than I would have liked (ie having A4/A5 connect to the I2C pins, and 11/12/13 to the SPI ("ISP") connector, rather than connecting them to alternate chip peripherals (as done with the SAMD Arduinos.)

author: Rudolph Riedel
author_rank: Regular Contributor
timestamp: July 18, 2023, 07:10:37 am
content: I had not really checked the schematic of the R4 WIFI as the R4 MINIMA was what I could get my hands on to play with.Am I the only one to find it odd how different the digital connector is wired between the variants?And I wonder if the CAN is actually good for anything as neither of the variants have a crystal.

author: ataradov
author_rank: Super Contributor
timestamp: July 19, 2023, 12:02:30 am
content: Oh, wow. The pinout differences are bizarre. Some are simple swaps (P104, P105), which could not even be explained by the need to allocate some specific pins for the LED matrix. Not that there is a need either way.Presumably their RC oscillator is well calibrated, so it would probably work well enough for hobby stuff.

author: PCB.Wiz
author_rank: Super Contributor
timestamp: July 19, 2023, 02:38:04 am
content: Quote from: Rudolph Riedel on July 18, 2023, 07:10:37 amYes, a strange omission, but it appears the simpler variant has provided footprints to fit a crystal and caps ?Why not allow that on both models ?

author: ataradov
author_rank: Super Contributor
timestamp: July 19, 2023, 02:54:30 am
content: Those boards have so many "minor" differences, it is almost like they were designed by different people based on the basic description.Without a transceiver on the board, I doubt there would be a lot of interest in the CAN here anyway.

author: Rudolph Riedel
author_rank: Regular Contributor
timestamp: July 19, 2023, 07:41:08 am
content: I am getting 23.81MHz on the SPI and the datasheet gives a range for the MOCO oszillator of 6.8 to 9.2 MHz.I have a doubt that this will work for CAN running at 500kBit/s and 1MBit/s seems impossible.I only do not have a CAN transceiver breakout-board to test this.Everything else should be fine.CAN is one of the advertised features for the UNO R4 though.

author: SiliconWizard
author_rank: Super Contributor
timestamp: July 19, 2023, 07:55:06 pm
content: Quote from: ataradov on July 19, 2023, 02:54:30 amThat's an opportunity for selling more "shields".

author: ataradov
author_rank: Super Contributor
timestamp: July 19, 2023, 08:06:42 pm
content: There are already shields for CAN with SPI-based controllers. And those are proven to work. So, if you have to buy a shield anyway, might as well get the SPI one and not worry about the clock issues.

author: westfw
author_rank: Super Contributor
timestamp: August 02, 2023, 07:51:22 am
content: Sigh. Am I just used to a different style, or is the Renesas documentation really awful?

author: ataradov
author_rank: Super Contributor
timestamp: August 02, 2023, 02:37:06 pm
content: It is some of the worst I've seen. To the point where I'm again no longer interested in doing anything with Renesas parts. If I have to read and parse awful documentation, it might as well be some random Chinese part, at least then I probably got it for a good price.