2015-08-30 01:14 PM
On the STM32L051 I was trying to use the WKUP1 pin to wake up the processor from standby mode. Too bad I didn't notice the fact that a pulldown is enabled on that pin....
So now I'm trying to play this through the tamper detection of the RTC. I re-generated code with STM32CubeMX, and part of that code is:/**Enable the RTC Tamper 2
*/
sTamper.Tamper = RTC_TAMPER_2;
sTamper.Trigger = RTC_TAMPERTRIGGER_RISINGEDGE;
sTamper.NoErase = RTC_TAMPER_ERASE_BACKUP_ENABLE;
sTamper.MaskFlag = RTC_TAMPERMASK_FLAG_DISABLE;
sTamper.Filter = RTC_TAMPERFILTER_DISABLE;
sTamper.SamplingFrequency = RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV8192;
sTamper.PrechargeDuration = RTC_TAMPERPRECHARGEDURATION_1RTCCLK;
sTamper.TamperPullUp = RTC_TAMPER_PULLUP_ENABLE;
sTamper.TimeStampOnTamperDetection = RTC_TIMESTAMPONTAMPERDETECTION_ENABLE;
HAL_RTCEx_SetTamper(&hrtc, &sTamper);
Unfortunately, theRTC_TAMPER_ERASE_BACKUP_ENABLE andRTC_TAMPERMASK_FLAG_DISABLE constants do not exist.
However, what does exist isRTC_TAMPERERASEBACKUP_ENABLED andRTC_MASKTAMPERFLAG_DISABLED.
Looks like a small bug to me?
2015-09-01 04:24 AM
Hi van_hest.bart,
Please upgrade to STM32CubeMx version 4.10.0, this bug is corrected. -Shahrzad-