• AVR Freaks

AnsweredHot!RTCC wakeup from Low-Voltage Retention Sleep

Author
Stepik
New Member
  • Total Posts : 4
  • Reward points : 0
  • Joined: 2019/01/21 08:44:37
  • Location: 0
  • Status: offline
2019/01/24 13:22:50 (permalink)
0

RTCC wakeup from Low-Voltage Retention Sleep

Dear all,
 
I'm using PIC24FJ64GA102 where I set up RTCC running on SOSC. I configured the RTCC to trigger an interrupt every minute. This works fine. However, the problem is when I put the micro into Low-voltage retention Sleep mode (RTCC still running). Once the RTCC fires an alarm, the code execution starts from the beginning instead of resuming the execution just after the Sleep() command. When waking up from the sleep mode I would expect the code to continue execution at the same place where it entered the sleep. Am I right?
Does anybody have an idea what can be wrong? Why is the code reseting after the RTCC wakeup? Or is it a normal behavior?
 
Any suggestions will be appreciated.
Many thanks
#1
soleil_sword
Starting Member
  • Total Posts : 43
  • Reward points : 0
  • Joined: 2009/03/12 14:03:59
  • Location: 0
  • Status: offline
Re: RTCC wakeup from Low-Voltage Retention Sleep 2019/07/08 10:58:57 (permalink)
0
Did you resolve this issue? I'm very interested!
#2
ric
Super Member
  • Total Posts : 22652
  • Reward points : 0
  • Joined: 2003/11/07 12:41:26
  • Location: Australia, Melbourne
  • Status: online
Re: RTCC wakeup from Low-Voltage Retention Sleep 2019/07/08 15:52:48 (permalink)
0
I assume you mean "deep sleep" mode.
That mode powers down the internal SRAM, so the only way out is via a reset. Your power up code has to read the deep sleep bit in the PCON register to determine if this happened.
It's all described in great details in sections 9.2.4.3 to 9.2.4.5 in the datasheet.
 

I also post at: PicForum
Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
NEW USERS: Posting images, links and code - workaround for restrictions.
To get a useful answer, always state which PIC you are using!
#3
dan1138
Super Member
  • Total Posts : 3120
  • Reward points : 0
  • Joined: 2007/02/21 23:04:16
  • Location: 0
  • Status: offline
Re: RTCC wakeup from Low-Voltage Retention Sleep 2019/07/08 16:51:04 (permalink)
0
The original post was from about 6 months ago so I expect the OP has found a solution or moved on.
 
In any case getting Deep Sleep working well is real tricky.
#4
Stepik
New Member
  • Total Posts : 4
  • Reward points : 0
  • Joined: 2019/01/21 08:44:37
  • Location: 0
  • Status: offline
Re: RTCC wakeup from Low-Voltage Retention Sleep 2019/07/13 02:39:37 (permalink)
0
Hi,
in my initial post I mentioned different micro type by mistake. I'm actually using PIC24FJ64GA702 (not PIC24FJ64GA102). The PIC24FJ64GA702 does not have a deep sleep mode option. It offers low voltage retention sleep mode as described in section 10.2.4. and 10.2.5. As I mentioned in my initial post, when waking up from this mode, the micro resets even though datasheet says it should resume operation. Unfortunately, I have not managed to solve this issue yet. I simply use just Sleep mode instead of the low-voltage Retention Sleep. It draws about 5uA more, but at least it works as expected. However, if you come up with any suggestions about the retention sleep, please let me know.
 
Thank you
 
#5
dan1138
Super Member
  • Total Posts : 3120
  • Reward points : 0
  • Joined: 2007/02/21 23:04:16
  • Location: 0
  • Status: offline
Re: RTCC wakeup from Low-Voltage Retention Sleep 2019/07/13 17:19:10 (permalink) ☼ Best Answerby Stepik 2019/07/14 01:17:03
0
Stepik
... As I mentioned in my initial post, when waking up from this mode, the micro resets even though datasheet says it should resume operation. ...

Your issue is addressed in the PIC24FJ256GA705-Family-Silicon-Errata. See item 5. Module: Power. The revision A3 silicon often does a reset on resume from retention sleep. The recommended work around is to force a device reset when resuming from sleep.
 
Perhaps you could see if this issue has been fixed in the revision A4 silicon.
#6
Stepik
New Member
  • Total Posts : 4
  • Reward points : 0
  • Joined: 2019/01/21 08:44:37
  • Location: 0
  • Status: offline
Re: RTCC wakeup from Low-Voltage Retention Sleep 2019/07/14 01:16:41 (permalink)
0
Thanks for answer. It's good to know what the problem is now. Hopefully the A4 revision will have this issue fixed as they claim.
#7
Jump to:
© 2019 APG vNext Commercial Version 4.5