-->
Page 6 of 6

Re: Deepsleep and Watchodog timer example?

PostPosted: Mon Jul 23, 2018 3:30 am
by panoss
It works!!!
Very strange isn 't it?
It had to be in hex in order to work?? :?:

Re: Deepsleep and Watchodog timer example?

PostPosted: Mon Jul 23, 2018 3:35 am
by QuickFix
panoss wrote:0xD693A400 is hex for decimal 3600000000, right?

On Windows:
  • Press the Windows-button
  • Type in "calc" (without the quotes) -> windows calculator pops up
  • Select menu "View" -> "Programmer (Alt + 3)"
  • Select the "Dec" (for decimal) and Qword (for 64 bit) radio buttons on the left
  • Type in (or copy - paste): 3600000000
  • Select the "Hex" (for hexadecimal) radio button
  • Tada! 8-)

Re: Deepsleep and Watchodog timer example?

PostPosted: Mon Jul 23, 2018 3:41 am
by Pablo2048
panoss wrote:It works!!!
Very strange isn 't it?
It had to be in hex in order to work?? :?:

Maybe you can try this:
Code: Select alluint64_t  sleepTime = 60ULL*60ULL*1000000ULL; // sleep for 60 min

because the preprocessor treats all constants as an integer and/or float (depends of decimal point).

Re: Deepsleep and Watchodog timer example?

PostPosted: Mon Jul 23, 2018 4:10 am
by panoss
Ok guys, thank you all!