Actually, there are/were examples, like in the thread @susan-parker :
showed an example of setting the TX/RX leds before the latest update was released.
Do RX/TX LEDS glow? - UNO R4 / UNO R4 Minima - Arduino Forum
Here is an alternative version of it, like I mentioned in previous post:
void setup() {
R_IOPORT_PinCfg(NULL,BSP_IO_PORT_00_PIN_12,IOPORT_CFG_PORT_DIRECTION_OUTPUT | IOPORT_CFG_PMOS_ENABLE); // TX LED
R_IOPORT_PinCfg(NULL,BSP_IO_PORT_00_PIN_13,IOPORT_CFG_PORT_DIRECTION_OUTPUT | IOPORT_CFG_PMOS_ENABLE); // RX LED
}
void loop() {
R_IOPORT_PinWrite(NULL, BSP_IO_PORT_00_PIN_12, BSP_IO_LEVEL_HIGH);
R_IOPORT_PinWrite(NULL, BSP_IO_PORT_00_PIN_13, BSP_IO_LEVEL_LOW);
delay(500);
R_IOPORT_PinWrite(NULL, BSP_IO_PORT_00_PIN_12, BSP_IO_LEVEL_LOW);
R_IOPORT_PinWrite(NULL, BSP_IO_PORT_00_PIN_13, BSP_IO_LEVEL_HIGH);
delay(500);
}
It alternates turning TX and RX led on and off...