STM32 power-on reset is abnormal, why manual reset is normal

Publisher:朝霞暮雨Latest update time:2017-10-01 Source: eefocusKeywords:STM32 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

describe:

The STM32f0 key module circuit often encounters the situation that it does not reset after power-on. The chip used is stm32f030, and the key module uses the ZLG7290 chip and 4X4 key LED matrix. ZLG7290 is a key chip specially developed by Zhou Ligong Company. It can support up to 64 keys and 64 LEDs, and can be read and written through the I2C protocol. The ZLG7290 and stm32f030 reset circuits use the datasheet reference circuit, as follows:Write the picture description here

Under normal circumstances, after the circuit is powered on, there will be a process in which all LEDs light up. After the power-on stabilization delay, all LEDs automatically go out. During normal operation, press the corresponding button and the corresponding LED light should light up.

question:

The STM32 reset circuit has its own pull-up resistor. The PVD power detection threshold uses the default value of 2.2V. It is powered by a battery. The voltmeter measures the pin voltage at around 2.8V. However, the circuit cannot operate normally after power-on. The LED matrix cannot be lit after power-on. The corresponding LED light does not respond after the button is pressed.

test

stm32f030 reset test 
After stm32f030 is powered on and reset, the program executes the initialization process in sequence, including setting the clock to the internal 48MHZ clock frequency, setting and starting the serial port, I2C, etc., and then executing the function of lighting up all LEDs, delaying 3s to turn off all LEDs and entering the main function program. 
Test task: Can stm32f030 be reset: 
Since the LED lights cannot be fully lit after power-on, the function of lighting up all LEDs cannot be executed normally, so add a UART serial port sending function before this function. 
Test results: 
The serial port sending function is executed, and normal data is received in the hyperterminal. 
This indicates that stm32f030 can be reset normally. 
Test task: Comment out the function of lighting up all LEDs. 
At this time, after power-on, the LEDs cannot be fully lit (the function is commented), but the corresponding LEDs can be lit after pressing the button. At this time, the problem can be locked in the function of lighting up all LEDs.

analyze:

The function to light up all LED lights is actually an I2C write function. By writing 0xFF to the corresponding register of ZLG7290, the LED can be lit. Using the above test method, insert a UART send function before each statement of the function and analyze the execution status. Among them, 
while(I2C_GetFlagStatus(I2C1, I2C_FLAG_TXIS) == RESET); 
is executed without any problems, which once again shows that stm32f030 can be reset normally. However,  after
the I2C_Senddata(I2C1, data); 
statement, the UART send function cannot be executed normally, so the problem is locked. 
ZLG7290 cannot be read and written normally, and it is very likely that ZLG7290 has not been reset. 
Looking up the datasheet of ZLG7290, it is found that the reset time of ZLG7290 is about 20ms, which is much longer than stm32f030, resulting in the situation that ZLG7290 is not reset normally.

in conclusion:

There may be many reasons why the circuit does not reset when powered on, especially when both the stm32f030 and the peripheral circuits need to be reset. Therefore, each module may need to be tested in isolation, and the problem can be finally locked before a solution can be found.


Keywords:STM32 Reference address:STM32 power-on reset is abnormal, why manual reset is normal

Previous article:Interpretation of STM32 low power mode
Next article:stm32f0 series reset failure when downloading in SWD mode

Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号