STM32L476的RTC使用问题记录

1. 在使用RTC的时间戳,从字面意思是,PC13的上升沿可以触发时间戳的中断函数

  /*##-1- Configure the Time Stamp peripheral ################################*/
  /*  RTC TimeStamp generation: TimeStamp Rising Edge on PC.13 Pin */
  HAL_RTCEx_SetTimeStamp_IT(&RtcHandle, RTC_TIMESTAMPEDGE_RISING, RTC_TIMESTAMPPIN_DEFAULT);

2. 中断回调函数,理解就是PC13的上升沿可以触发RTC的时间戳

/**
  * @brief  This function handles Tamper interrupt request.
  */
void TAMP_STAMP_IRQHandler(void)
{
  HAL_RTCEx_TamperTimeStampIRQHandler(&RtcHandle);
}
原文地址:https://www.cnblogs.com/429512065qhq/p/10195218.html