menu search
person
thumb_up_alt 1 like thumb_down_alt 0 dislike
90 views

Please log in or register to answer this question.

1 Answer

The volatile keyword is a part of C standard, and this warns the compiler that ISR might change the value of a variable so that the compiler will not optimize the code in a way that will make it fall.

Here, need to declare:

static volatile long int iSecondsToday;

With the volatile keyword in the declaration, the compiler will know that the variable is volatile and each reference is read from memory.

If the keyword is not supported, you can still get the similar result by turning off the compiler optimizations.
thumb_up_alt 0 like thumb_down_alt 0 dislike
← Prev Question Next Question →
Request Answer

Related questions

thumb_up_alt 0 like thumb_down_alt 0 dislike
45 views 1 answer
thumb_up_alt 0 like thumb_down_alt 0 dislike
52 views 1 answer
thumb_up_alt 1 like thumb_down_alt 0 dislike
124 views 1 answer
thumb_up_alt 1 like thumb_down_alt 0 dislike
232 views 1 answer
thumb_up_alt 1 like thumb_down_alt 0 dislike
113 views 1 answer
thumb_up_alt 1 like thumb_down_alt 0 dislike
94 views 1 answer
thumb_up_alt 1 like thumb_down_alt 0 dislike
286 views 1 answer
thumb_up_alt 3 like thumb_down_alt 0 dislike
75 views 1 answer
thumb_up_alt 3 like thumb_down_alt 0 dislike
97 views 1 answer
thumb_up_alt 0 like thumb_down_alt 0 dislike
65 views 1 answer
thumb_up_alt 3 like thumb_down_alt 0 dislike
65 views 1 answer
thumb_up_alt 2 like thumb_down_alt 0 dislike
89 views 1 answer
thumb_up_alt 3 like thumb_down_alt 0 dislike
47 views 1 answer
thumb_up_alt 0 like thumb_down_alt 0 dislike
73 views 0 answers
thumb_up_alt 0 like thumb_down_alt 0 dislike
54 views 0 answers
thumb_up_alt 0 like thumb_down_alt 0 dislike
56 views 1 answer
thumb_up_alt 0 like thumb_down_alt 0 dislike
566 views 0 answers
thumb_up_alt 0 like thumb_down_alt 0 dislike
54 views 1 answer
thumb_up_alt 0 like thumb_down_alt 0 dislike
491 views 1 answer
thumb_up_alt 0 like thumb_down_alt 0 dislike
81 views 1 answer
thumb_up_alt 0 like thumb_down_alt 0 dislike
93 views 1 answer
thumb_up_alt 0 like thumb_down_alt 0 dislike
3,072 views 1 answer
thumb_up_alt 0 like thumb_down_alt 0 dislike
88 views 1 answer
thumb_up_alt 0 like thumb_down_alt 0 dislike
62 views 1 answer
thumb_up_alt 0 like thumb_down_alt 0 dislike
88 views 1 answer
thumb_up_alt 0 like thumb_down_alt 0 dislike
1,237 views 1 answer
thumb_up_alt 0 like thumb_down_alt 0 dislike
108 views 1 answer
thumb_up_alt 2 like thumb_down_alt 0 dislike
2,302 views 1 answer
thumb_up_alt 1 like thumb_down_alt 0 dislike
103 views 1 answer
thumb_up_alt 2 like thumb_down_alt 0 dislike
264 views 2 answers
thumb_up_alt 1 like thumb_down_alt 0 dislike
123 views 1 answer
thumb_up_alt 1 like thumb_down_alt 0 dislike
263 views 1 answer
thumb_up_alt 1 like thumb_down_alt 0 dislike
99 views 1 answer
thumb_up_alt 1 like thumb_down_alt 0 dislike
711 views 1 answer
thumb_up_alt 1 like thumb_down_alt 0 dislike
58 views 1 answer
thumb_up_alt 1 like thumb_down_alt 0 dislike
65 views 1 answer
thumb_up_alt 1 like thumb_down_alt 0 dislike
93 views 1 answer
thumb_up_alt 2 like thumb_down_alt 0 dislike
621 views 1 answer
Welcome to AskOrAnswerMe.com , where you can ask questions and receive answers from other user. Feel free to ask any question. Help everyone by giving best answer to the questions.

11,591 questions

10,205 answers

190 comments

4,193 users

...