I'm writing a bootloader which will be loaded into RAM over SWD. The bootloader needs to set HOCO to at least 32 MHz to generate a 32 MHz FCLK, but it seems this is only possible via the option flash setting FS1.HOCOFRQ1. I don't have control of the previous flash contents, so OFS1 may be set to any value when the bootloader is loaded
Is there any way to adjust HOCO frequency at runtime?
No, the HOCO frequency can only be set via the OFS1 register.
The Flash on the RA2A1 can be programmed and erased with an FCLK frequency between 1MHz and 32MHz