430 startup, I/O interrupt

Publisher:悠闲自在Latest update time:2017-01-09 Source: eefocusKeywords:I Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

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.


Keywords:I Reference address:430 startup, I/O interrupt

Previous article:430 Universal Asynchronous Serial Communication Module
Next article:Msp430 Overview

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号