Remarks: After watching this episode of MSP430, I realized that there is really no difference between msp430 and arm7, and it may be better than arm7 in some functions.
1:430 System reset and initialization
There are two sources for the 430 system reset
1: POR power-on reset, it has 3 sources can be powered on the device, found that the voltage is unstable, give a reset signal to the reset circuit can lead to a reset signal
2: PUC power-on clear, it also has 4 sources, it can be a POR interrupt, it can be a watchdog timer overflow, it can be a watchdog key error, it can also be a flash read and write error.
When the 430 microcontroller is powered on, a reset signal is sent to initialize the internal registers to ensure the normal operation of the CPU. At the same time, PC points to oxffe and SP points to the top of the stack. A unique feature of 430 is that the watchdog is enabled by default.
430 interrupts are divided into three categories: system reset, non-maskable interrupt, maskable interrupt
1: System reset refers to POR and PUC interrupts
2: Non-maskable interrupt, that is, the status register cannot control it. If something happens, an interrupt will be generated immediately. Unexpected situations include: failure of the external oscillator, incorrect access to the flash space, etc.
3: Interrupts can be masked, and general interrupts must be enabled on the status register to control
430 interrupt response: (requires six machine cycles)
The steps are as follows: 1: Execute the statement pointed to by the current pc
2: Take out the address of the next statement and the value of the status register and push them into the stack
3: Determine the priority of the interrupt through arbitration logic
4: Execute the interrupt service routine (Note that for unit interrupts, the interrupt flag will be automatically cleared, such as serial port interrupts, but for multiple interrupts, such as POR and PUC interrupts, it must be cleared manually by the user
5: Retrieve the address in the stack and the value of the status register, and continue to execute the original program
The 430's general I/O is also interesting
It has 6 sets of general I/O, but unlike other MCUs, its I/O direction is the default input direction. The number of functions has reached an unprecedented number. P1 and P2 can be used as external interrupts, so the number of interrupts is 16. The interrupt of 430 can only be edge-triggered, not level-triggered. Users can set whether the rising edge or falling edge triggers the interrupt.
Since the I/O pins are input by default, they need to be set, which involves register operations. For detailed information, see the datasheet.
Previous article:430 Universal Asynchronous Serial Communication Module
Next article:Msp430 Overview
- 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
- Please tell me the role of these two resistors in the circuit
- Is the naked-eye 3D large screen also made of light-emitting diodes (LED)? What is the principle?
- Comparison of TI's tms320 series DSP
- New employee: I am the most idle person in the company, so my boss assigned me to write the bootloader
- I feel like I can't stay in this stupid company any longer.
- TI High Power Density Solution Analysis!
- Can the CH246 & CH241 wireless charging kit be used like this?
- Popular Science Sharing - Detailed Explanation of the Working Principles of Starlink Satellites (Episode 1)
- Thank you for your strong faith
- MCU SPI communication interface