The OP
Published on 2022-6-4 14:29
Only look at the author
This post is from stm32/stm8
Latest reply
This post was last edited by vincentc543 on 2022-6-5 23:47
bool flag=0;
void close( void)
{
.......
cs_low_fm = 0;
flag=1; //dyjc set value
.......
}
two,
void RTC_IRQHandler(void) // RTC interrupt is executed once per second
{
.......
dyjc++; // (2)
if(flag){
dyjc = 1190; // (1)
flag=0;
}
.......
}
Details
Published on 2022-6-5 23:37
| ||
|
||
2
Published on 2022-6-4 16:21
Only look at the author
This post is from stm32/stm8
| ||
|
||
|
3
Published on 2022-6-4 16:22
Only look at the author
This post is from stm32/stm8
Comments | ||
|
||
|
This post is from stm32/stm8
Comments
The probability of this error happening is very small. Your timer interrupt occurs once a second. The timer interrupt modifies a variable, and the error will occur when the variable is assigned a value. Therefore, this error may not occur even if the program is run several times, dozens of times, hundreds of times, or thousands of times, and it is difficult to detect. But it is indeed an error
Details
Published on 2022-6-4 17:02
| ||
|
||
|
5
Published on 2022-6-4 17:02
Only look at the author
This post is from stm32/stm8
| ||
|
||
|
6
Published on 2022-6-4 19:33
Only look at the author
This post is from stm32/stm8
Comments | ||
|
||
|
7
Published on 2022-6-5 00:41
Only look at the author
This post is from stm32/stm8
| ||
|
||
|
8
Published on 2022-6-5 01:22
Only look at the author
This post is from stm32/stm8
| ||
|
||
|
vincentc543
Currently offline
|
9
Published on 2022-6-5 23:36
Only look at the author
|
|
|
|
vincentc543
Currently offline
|
10
Published on 2022-6-5 23:37
Only look at the author
This post is from stm32/stm8
| |
|
||
|
Visited sections |
论坛测评队员
EEWorld Datasheet Technical Support
EEWorld
subscription
account
EEWorld
service
account
Automotive
development
circle
About Us Customer Service Contact Information Datasheet Sitemap LatestNews
Room 1530, Zhongguancun MOOC Times Building, Block B, 18 Zhongguancun Street, Haidian District, Beijing 100190, China Tel:(010)82350740 Postcode:100190