RTC timer is unstable in simulation
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-07-08 4:13 AM
Posted on July 08, 2016 at 13:13
Hi Team,
Use RTC as timer to restart STM32F030K6 from stop mode every 10mS, Set/Reset a dedicated I/O to show stop and running duration respectively in main loop like following procedure. while(1){ if( RTC_Refresh_TimeOn ) { RTC_Refresh_TimeOn = 0; ... HAL_DBGMCU_EnableDBGStopMode(); HAL_PWR_EnterSTOPMode(PWR_MAINREGULATOR_ON, PWR_SLEEPENTRY_WFI); HAL_DBGMCU_DisableDBGStopMode(); EnablePLL(); ... }}After burn the program or simulate the program, always got the I/O output pulse is not period, it is saying RTC is unstable. But when re-power the device, the I/O out wave is period.Can you give some suggestion?Best RegardsJHL
4 REPLIES 4
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-07-11 7:54 AM
Posted on July 11, 2016 at 16:54
Hi,
You can review RTC example under STM32CubeF0: STM32Cube_FW_F0_V1.6.0\Projects\STM32F030R8-Nucleo\Examples\RTC\RTC_AlarmIt will be better to compare your generated code with one of the provided RTC applications and identify what you have missed. RegardsOptions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-07-12 8:05 AM
Posted on July 12, 2016 at 17:05
Hi liu.jianhui,
I suggest to share the RTC configuration/initialization part from your code to try helping you. And what can of STM32 hardware you are using ? -Hannibal-Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-07-13 12:43 AM
Posted on July 13, 2016 at 09:43
Hi Hannibal,
After more verification of the issue, we found that RTC running is good when simulating with ST-Link. The issue occurs when using J-LINK. So wet wonder if there is some data setting of simulator affecting STM32F030 internal logic to get RTC unstable? Best Regards,JHLOptions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-07-13 2:40 AM
Posted on July 13, 2016 at 11:40
Assume interaction on SWD of debugger is NOT instant, and it might take several, or ten, milliseconds.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Up vote any posts that you find helpful, it shows what's working..
