/* This function changes the System Clock. Currently MOSC and SOSC are not connected on RA2L1 board. So these needs to be turned OFF.  */
static void preffered_ra_clock_setting(void)
/* This function changes the System Clock. Currently MOSC and SOSC are not connected on RA2L1 board. So these needs to be turned OFF.  */
static void preffered_ra_clock_setting(void)
{
    fsp_err_t err = FSP_SUCCESS;
    err = R_CGC_ClockStop(&g_cgc0_ctrl, CGC_CLOCK_MAIN_OSC);
    if (FSP_SUCCESS != err)
    {
        LOG_E("Returned Error Code: 0x%x", err);
    }
    err = R_CGC_ClockStop(&g_cgc0_ctrl, CGC_CLOCK_SUBCLOCK);
    if (FSP_SUCCESS != err)
    {
        LOG_E("Returned Error Code: 0x%x", err);
    }
}