Support external crystal for RA6M5

Hi,

I’m currently working with the RA6M5 MCU, and there has been a recent hardware modification to add an external crystal. This change needs to be supported in the firmware.

Hardware Design

BSP Configuration

Clock Configuration

Issue

After loading the firmware onto the board, the system does not function as expected. Upon debugging, I observed that the code is stuck at:

void bsp_clock_init (void)
{
. . .
    FSP_HARDWARE_REGISTER_WAIT(R_SYSTEM->OSCSF_b.MOSCSF, 1U);
. . .
}

Could you please help identify what might be going wrong? 

Thanks!