/* Enables the RTC TimeStamp functionality and config the Timestamp event active edge.  */
void RTC_EnableTimeStamp(RTC_TIMESTAMP_EDGE_T edge)
/* Enables the RTC TimeStamp functionality and config the Timestamp event active edge.  */
void RTC_EnableTimeStamp(RTC_TIMESTAMP_EDGE_T edge)
{
    RTC_DisableWriteProtection();
    RTC->CTRL_B.TSEN = BIT_RESET;
    RTC->CTRL_B.TSETECFG = edge;
    RTC->CTRL_B.TSEN = BIT_SET;
    RTC_EnableWriteProtection();
}