- #define ROTATE_A PAin(2)
- #define ROTATE_B PAin(3)
- s16 DATA=0;
- void EXTI2_IRQHandler(void)
- {
- if (EXTI_GetITStatus(EXTI_Line2) != RESET)
- {
- if(ROTATE_A!=ROTATE_B)
- {
- DATA++;
- }
- else DATA--;
- EXTI_ClearITPendingBit(EXTI_Line2);
- }
- }
- void main(void)
- {
- SystemInit();
- delay_init(72);
- NVIC_Configuration();
- KEY_Init();
- while(1)
- {
- ;
- }
- }
Previous article:ARM Download Error
Next article:STM32F105 USB pin Vbus processing
Recommended ReadingLatest update time:2024-11-15 17:48
How to draw a schematic diagram of an STM32 microcontroller in a formal way
A common sense about STM32F1 series microcontrollers: From the above figure, we can see that according to the size of the Flash memory, STM32F1 is divided into 4 types, namely "low density", "medium density", "high density", "ultra-high density", and "interconnected type". The FLASH size of the STM32F103VET6 we use
[Microcontroller]
STM32 Notes External Interrupt GPIO
b) Initialization function definition:
void EXTI_Configuration(void); //Define IO interrupt initialization function
c) Initialization function call:
EXTI_Configuration(); //IO interrupt initialization function call Simple application:
d) Initialization function:
void EXTI_Configuration(void)
{
EXTI_InitTypeDef
[Microcontroller]
STM32 Novice Growth Record---System Tick Timer (systick) Application
1. Systick Introduction Systick is just a timer, but it is placed in NVIC. Its main purpose is to provide a hardware interrupt (called tick interrupt) to the operating system. Tick interrupt? Here is a brief explanation. When the operating system is running, it will also have a "heartbeat". It will work according
[Microcontroller]
STM32 Learning: External Interrupts
STM32 GPIO external interrupt summary 1. STM32 interrupt grouping: Each GPIO of STM32 can be configured as an external interrupt trigger source, which is also the strength of STM32. STM32 divides many interrupt trigger sources into different groups according to the pin numbers. For example, PA0, PB0, PC0, PD0, PE0
[Microcontroller]
STM32 internal flash reading and writing program
/* Base address of the Flash sectors */ #define ADDR_FLASH_SECTOR_0 ((uint32_t)0x08000000) /* Base @ of Sector 0, 16 Kbytes */ #define ADDR_FLASH_SECTOR_1 ((uint32_t)0x08004000) /* Base @ of Sector 1, 16 Kbytes */ #define ADDR_FLASH_SECTOR_2 ((uint32_t)0x08008000) /* Base @ of Sector 2, 16 Kbytes
[Microcontroller]
Use STM32 to control the passive buzzer to play music (STM32_07)
1. Passive buzzer and active buzzer The active buzzer contains an oscillation source and will make a sound as long as it is powered on, but the frequency is fixed and the tone is single; the passive buzzer does not contain an oscillation source, and its internal structure is equivalent to an electromagnetic field sp
[Microcontroller]
STM32 Notes--SDIO (SD card reading)
To learn here, you must first understand the basic information of SD card: The SD card protocol has too many parts and is quite complicated. The recommended document is: "Simplified_Physical_Layer_Spec.pdf". Its main complexity lies in the numerous commands. There are 64 commands in total. You can check the do
[Microcontroller]
STM32 reads and writes flash to save user data
In actual projects, we may need to save some data and hope that the data can be used next time we start the system. Here we introduce how to use the internal flash of STM32 to save data. Here I use the STM32F103C8T6 chip for introduction. The flash size is 64K. In this example, 0x0800 0000~0x800 3000 is used as the bo
[Microcontroller]
- Popular Resources
- Popular amplifiers
Recommended Content
Latest Microcontroller Articles
He Limin Column
Microcontroller and Embedded Systems Bible
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
MoreSelected Circuit Diagrams
MorePopular Articles
- 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
MoreDaily News
- Keysight Technologies Helps Samsung Electronics Successfully Validate FiRa® 2.0 Safe Distance Measurement Test Case
- Innovation is not limited to Meizhi, Welling will appear at the 2024 China Home Appliance Technology Conference
- Innovation is not limited to Meizhi, Welling will appear at the 2024 China Home Appliance Technology Conference
- Huawei's Strategic Department Director Gai Gang: The cumulative installed base of open source Euler operating system exceeds 10 million sets
- Download from the Internet--ARM Getting Started Notes
- Learn ARM development(22)
- Learn ARM development(21)
- Learn ARM development(20)
- Learn ARM development(19)
- Learn ARM development(14)
Guess you like
- Domestic voltage regulator device
- CC2650 launchpad and msp432 launchpad
- Switching Power Supply Interest Group 19th Task
- LED power supply not working
- Smart MM32 + UCOS + uCGUI
- How to decorate a chemical analysis room?
- Find VHDL half-integer division
- Has anyone used AMIS-30543 to drive a stepper motor?
- Is the emitter voltage of the PNP tube pulled down by the base?
- Basic knowledge of wireless WiFi coverage