8045 views|13 replies

72

Posts

0

Resources
The OP

stm8a, why do you let me down so much? ? ? ? (MCU automatically resets,) [Copy link]

During the program running, the MCU resets automatically out of order, and the value of the reset register RST_SR is 0. The oscilloscope is used to observe the power supply of the MCU, and NRST is very clean.
I carefully found the reset sentence in the program and found that
1 CurPinStat.byaData[0] = 0x00;
2 CurPinStat.byaData[1] = 0x00;
3 CurPinStat.byaData[2] = 0x00;
4 // CurPinStat.byaData[3] = 0x00;
The fourth sentence, as long as it is added to the program, the system will reset very frequently. Why, for the same array, the fourth sentence cannot be assigned a value, while the first three sentences can work. I don’t understand.
If I didn’t define CurPinStat.byaData[3] before, the program should run away, which would lead to a watchdog reset, and the reset register RST_SR should not read 0.
Please help me. . . . . . .
This post is from stm32/stm8

Latest reply

  I guess it's the original poster's problem, but I really can't praise the compiler of stm8s. . .   Details Published on 2018-9-13 11:31

67

Posts

0

Resources
2
The array of CurPinStat.byaData[3]

overflowed, didn't it? This has nothing to do with stm8, it's purely C language
This post is from stm32/stm8

63

Posts

0

Resources
3
Defining CurPinStat.byaData[3] means that you can only use 3 cells. Using the fourth cell will cause the array to overflow, and you will get unpredictable results.

It is best for you to learn C language well first.
This post is from stm32/stm8

76

Posts

0

Resources
4
Defining CurPinStat.byaData[3] means that you can only use 3 cells. Using the fourth cell will cause the array to overflow, and you will get unpredictable results.

It is best for you to learn C language better first.
Perfume City posted on 2010-4-2 15:33
I will not define only CurPinStat.byaData[3]. If the so-called experts of ST can only discuss this aspect with me, then there is nothing I can do. It is not me who says that the MCU of ST is bad. I called the technical support of ST headquarters and asked them which car system the STM8A MCU has been successfully used in. The answer was...
This paragraph is indeed nonsense. Haha, STM8 has only been launched for a short time, so it is normal even if it is not available.
The one who messed up the place...
This is most likely a problem with the OP's program.
Haha, just for fun.
However, I guess the original poster has found the cause of the problem, so he is too embarrassed to reply to this thread.


STM8 is at most a modified 51, but it won't be so inferior. Its predecessor ST7 can be certified.
As for the compiler, it won't make such a low-level mistake. This is an international joke.

I have used KEIL C51 for so many years, from the DOS era to the XP era, and witnessed many bugs in KEIL. I have never made such a low-level bug.
I guess it's the original poster's problem, but I really can't praise the compiler of stm8s. . .
Compiler Problems
STM8, I have never used it
CurPinStat.byaData[4] should be defined
I guess it's the original poster's problem, but I really can't praise the compiler of stm8s. . .
stm8a, why do you let me down so much? ? ? ? (MCU automatically resets,)
This post is from stm32/stm8

77

Posts

0

Resources
5
I will not define only CurPinStat.byaData[3]. If the so-called experts of ST can only discuss this aspect with me, then there is nothing I can do. It is not me who says that the MCU of ST is bad. I called the technical support of ST headquarters and asked them which car system the STM8A MCU has been successfully used in. The answer was...
This paragraph is indeed nonsense. Haha, STM8 has only been launched for a short time, so it is normal even if it is not available.
This post is from stm32/stm8

69

Posts

0

Resources
6
                                 The one who messed up the place...
This post is from stm32/stm8

78

Posts

0

Resources
7
                                 This is most likely a problem with the OP's program.
This post is from stm32/stm8

72

Posts

0

Resources
8
Haha, just for fun.
However, I guess the original poster has found the cause of the problem, so he is too embarrassed to reply to this thread.
This post is from stm32/stm8

81

Posts

0

Resources
9


STM8 is at most a modified 51, but it won't be so inferior. Its predecessor ST7 can be certified.
As for the compiler, it won't make such a low-level mistake. This is an international joke.

I have used KEIL C51 for so many years, from the DOS era to the XP era, and witnessed many bugs in KEIL. I have never made such a low-level bug.
This post is from stm32/stm8

63

Posts

0

Resources
10
                                 I guess it's the original poster's problem, but I really can't praise the compiler of stm8s. . .
This post is from stm32/stm8

72

Posts

0

Resources
11
                                 Compiler Problems
This post is from stm32/stm8

72

Posts

0

Resources
12
                                 STM8, I have never used it
This post is from stm32/stm8

454

Posts

2

Resources
13
CurPinStat.byaData[4] should be defined
This post is from stm32/stm8

32

Posts

0

Resources
14
  I guess it's the original poster's problem, but I really can't praise the compiler of stm8s. . .
This post is from stm32/stm8

Guess Your Favourite
Find a datasheet?

EEWorld Datasheet Technical Support

Related articles more>>
    Copyright © 2005-2025 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
    快速回复 返回顶部 Return list