Setting the RTCOUT for R7FA4M1AB3CFM in FSP 3.7.0

I want to output a 1 Hz waveform from the RTCOUT pin (P407). I have successfully configured the pin, but can't seem to get an output on P407. Are there certain steps that I have to follow to get this working? 

Top Replies

  • Hey 

    Can you mention what are the steps you've performed till now for the configuration and how do you know that the pin has been configured successfully? That would be a good starting point to help you out.

    Thanks,
    Jayesh

  • Assuming that you have enabled the RTCOUT pin in the pin configuration, add this line of code to your project.

    R_RTC->RCR2_b.RTCOE = 1;

    For example:

    void hal_entry(void)
    {
        /* TODO: add your own code here */
        fsp_err_t err;

        err = R_RTC_Open(&g_rtc0_ctrl, &g_rtc0_cfg);
        if( FSP_SUCCESS != err )
        {
            __BKPT(1);
        }


        err = R_RTC_CalendarTimeSet(&g_rtc0_ctrl, &sys_time);
        if( FSP_SUCCESS != err )
        {
            __BKPT(1);
        }

        R_RTC->RCR2_b.RTCOE = 1;

        while(1);

    }

    Would have thought that an API may exist for this, or would be enabled by default when you enable the pin in the pin config.

    Will feedback to the FSP developers

    Regards,