STM32CubeMX RTC code generation: probably a bug?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2015-08-30 1:14 PM
Posted on August 30, 2015 at 22:14
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?
This discussion is locked. Please start a new topic to ask your question.
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2015-09-01 4:24 AM
Posted on September 01, 2015 at 13:24
Hi van_hest.bart,
Please upgrade to STM32CubeMx version 4.10.0, this bug is corrected. -Shahrzad-