I thought I should post on the Knowledge Base/Renesas Engineering Community, but the "+ New" button is broken and I can't make a new post, so here's an issue.
In your R01DS0355EJ0110 Rev.1.10 Sep 29, 2023, RA4M1 Group Datasheet, Page 76, there's Note 4, saying: "The upper limit of RSPCK is 16 MHz". This is a very serious thing and it shouldn't be a footnote. Given that if you don't have external crystal, RSPCK is the main clock divided by an even number, this means that you have three options:
a) Run the chip at 32MHz (HOCOFRQ1[2:0] = 010) and sacrifice a third of CPU performance. On top of that you break USB because it needs 48MHz
b) Run the SPI at 12 Mhz which is 48 MHz divided by the even number 4. This is what most Arduino UNO R4 people should do.
c) Go out of spec - as many Arduino Uno R4 users report doing - and go with 24 MHz SPI (* it might work for 5V, at room temperature, with short traces to an SD card or display, especially if noone is looking *)
Those are quite serious consequences for just a footnote. Maybe the footnote is a mistake? It could be so, since there are examples of your code that show that you support 24 Mhz like this one:
<property id="config.bsp.fsp.mcu.sci_spi.max_bitrate" value="12000000" />
<property id="config.bsp.fsp.mcu.spi.max_bitrate" value="24000000" />
Also the implementation of R_SPI_CalculateBitrate here, implements everything on the datasheet, except that footnote. So people can use it to clock SPI at 24 Mhz.
This might seem like a pedantic documentation issue, but my AI Agents have been fighting about this for hours, and reasonably. Google's AI doesn't hesitate to answer 24 MHz.
Some clarity would be appreciated from both humans and AIs.
I thought I should post on the Knowledge Base/Renesas Engineering Community, but the "+ New" button is broken and I can't make a new post, so here's an issue.
In your R01DS0355EJ0110 Rev.1.10 Sep 29, 2023, RA4M1 Group Datasheet, Page 76, there's Note 4, saying: "The upper limit of RSPCK is 16 MHz". This is a very serious thing and it shouldn't be a footnote. Given that if you don't have external crystal, RSPCK is the main clock divided by an even number, this means that you have three options:
a) Run the chip at 32MHz (
HOCOFRQ1[2:0] = 010) and sacrifice a third of CPU performance. On top of that you break USB because it needs 48MHzb) Run the SPI at 12 Mhz which is 48 MHz divided by the even number 4. This is what most Arduino UNO R4 people should do.
c) Go out of spec - as many Arduino Uno R4 users report doing - and go with 24 MHz SPI (* it might work for 5V, at room temperature, with short traces to an SD card or display, especially if noone is looking *)
Those are quite serious consequences for just a footnote. Maybe the footnote is a mistake? It could be so, since there are examples of your code that show that you support 24 Mhz like this one:
Also the implementation of
R_SPI_CalculateBitratehere, implements everything on the datasheet, except that footnote. So people can use it to clock SPI at 24 Mhz.This might seem like a pedantic documentation issue, but my AI Agents have been fighting about this for hours, and reasonably. Google's AI doesn't hesitate to answer 24 MHz.
Some clarity would be appreciated from both humans and AIs.