Dual G2 on Arduino UNO R4, timer one?

Hi,
I’m using the 18v22 on the UNO rev4 which has a Renesas RA4M1 chip. The Library for the G2 specifies the use of timer1 for the PWM to the driver for the AVR ATmega328P used in UNO rev3.
What would be the easiest way to make the library use timer1 of the Renesas RA4M1?
The hardware PWM of timer1 should result in better current sensing.
Thx.

Hello.

Our library does not currently support getting 20kHz PWM signals from the Renesas RA4M1, and making it work would probably be an extensive modification.

I have not thoroughly looked into the Renesas RA4M1, but my understanding is that it does not have a “timer1” like the ATmega 328P; instead, it has General PWM Timers (GPT). So, one method for modifying the library might be to set up a separate property to specify the RA4M1 chip and when that is defined use the PwmOut class that is part of the Arduino Renesas core.

Brandon

Hi Brandon,
It doesn’t seem to be a major change, if you know what you are doing. Unfortunately I’m not a good enough programmer to alter libraries. Is there someone at Polulu for which it is peanuts? I guess you need to keep your library up to date?
Thx, kind regards. Joris

We would like to add support for the Arduino R4 to our libraries, but it is not something that we are currently actively working on or have an estimated time frame for.

By the way, to avoid confusion, please note that our company name is Pololu (not “Polulu”).

Brandon