Description of Contex-M3 registers in STM32

Publisher:星辰小鹿Latest update time:2016-08-01 Source: eefocusKeywords:STM32  Contex-M3  Register Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
          Three groups of registers defined by Cortex-M3 are used in STM32. The description of these three groups of registers is not in the technical manual of STM32. You need to refer to the Cortex-M3 Technical Reference Manual (r2p0) released by ARM. 

        Three structures are defined in the STM32 firmware library to correspond to these three register groups. The correspondence between these three structures and the registers in the ARM manual is as follows:

 
1. NVIC register group
The STM32 firmware library has the following definitions:
typedef struct
{
  vu32 ISER[2];
  u32 RESERVED0[30];
  vu32 ICER[2];
  u32 RSERVED1[30];
  vu32 ISPR[2];
  u32 RESERVED2[30];
  vu32 ICPR[2];
  u32 RESERVED3[30];
  vu32 IABR[2];
  u32 RESERVED4[62];
  vu32 IPR[11];
} NVIC_TypeDef;
 
Their corresponding names in the ARM manual are
ISER = Interrupt Set-Enable Registers
ICER = Interrupt Clear-Enable Registers
ISPR = Interrupt Set-Pending Register
ICPR = Interrupt Clear-Pending Register
IABR = Active Bit Register
IPR = Interrupt Priority Registers
 
Each register has 240 bits, starting with Interrupt Set-Enable Register. Registers description: ISER[0] corresponds to interrupt sources 0~31, ISER[1] corresponds to interrupt sources 32~63. STM32 has only 60 interrupt sources, so there is no ISER[2:7].
 
Referring to the interrupt vector table in the STM32 technical reference manual, the locations of the interrupt sources are:
Position 0 - WWDG = Window Watchdog interrupt
Position 1 - PVD = PVD through EXTI Line detection interrupt
Position 2 - TAMPER = Tamper interrupt
......
Position 58 - DMA2_Channel3 = DMA2 Channel3 global interrupt
Position 59 - DMA2_Channel4_5 = DMA2 Channel4 and DMA2 Channel5 global interrupts
 
2. System control register group The
STM32 firmware library has the following definitions:
typedef struct
{
  vuc32 CPUID;
  vu32 ICSR;
  vu32 VTOR;
  vu32 AIRCR;
  vu32 SCR;
  vu32 CCR;
  vu32 SHPR[3];
  vu32 SHCSR;
  vu32 CFSR;
  vu32 HFSR;
  vu32 DFSR;
  vu32 MMFAR;
  vu32 BFAR;
  vu32 AFSR;
} SCB_TypeDef; /* System Control Block Structure */
 
Their corresponding names in the ARM manual are
CPUID = CPUID Base Register
ICSR = Interrupt Control State Register
VTOR = Vector Table Offset Register
AIRCR = Application Interrupt/Reset Control Register
SCR = System Control Register
CCR = Configuration Control Register
SHPR = System Handlers Priority Register
SHCSR = System Handler Control and State Register
CFSR = Configurable Fault Status Registers
HFSR = Hard Fault Status Register
DFSR = Debug Fault Status Register
MMFAR = Mem Manage Address Register
BFAR = Bus Fault Address Register
AFSR = Auxiliary Fault Status Register3
 
. System clock register group The
STM32 firmware library has the following definitions:
typedef struct
{
  vu32 CTRL;
  vu32 LOAD;
  vu32 VAL;
  vuc32 CALIB;
} SysTick_TypeDef;
 
Their corresponding names in the ARM manual are
CTRL = SysTick Control and Status Register
LOAD = SysTick Reload Value Register
VAL = SysTick Current Value Register
CALIB = SysTick Calibration Value Register

Keywords:STM32  Contex-M3  Register Reference address:Description of Contex-M3 registers in STM32

Previous article:STM32 different flash memory capacity boot file selection instructions
Next article:STM32 learning timer debugging summary

Recommended ReadingLatest update time:2024-11-16 07:39

Design of Rubik's Cube Solving Robot Based on STM32
Solution Design The servo is used as the driving motor of the Rubik's Cube. From the driving principle of the servo, it can be seen that the speed of the servo is not related to the main frequency, so there is no difference in the control effect between using a servo with a lower main frequency and using a serv
[robot]
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号