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:
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.
Previous article:Interpretation of STM32 low power mode
Next article:stm32f0 series reset failure when downloading in SWD mode
- Popular Resources
- Popular amplifiers
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- Analysis of the characteristics, advantages and potential applications of 60GHz wireless technology
- Looking for the design of station signal simulation control system
- EEWorld invites you to attend the 2019 STM32 Summit and Fan Carnival!
- Switching Power Supply Interest Group 16th Task
- A brief introduction to the internal structure of photoelectric sensors
- Geek Black Technology, Shopping Carnival | Here are the deals you can’t miss!
- I need help from an expert. "When designing a microcontroller hardware circuit using STC89C51, should I design the EEPROM circuit part?"
- Claiming that software is open source when it is not is false advertising
- Zigbee 3.0 universal gateway coordinator based on CC2652R
- Ask a question about the LM35CZ temperature sensor