Environment: STM32F407, IAR 7.4, STM32CubeF4
GPIO configuration code:
GPIO_InitStruct.Pin = GPIO_PIN_10;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
GPIO_InitStruct.Pull = GPIO_PULLDOWN;
GPIO_InitStruct.Speed = GPIO_SPEED_HIGH;
GPIO_InitStruct.Alternate = GPIO_AF15_EVENTOUT;
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
The pulse output uses a function defined in intrinsics.h:
__SETV();
Output waveform:
The sampling rate of the oscilloscope is only this high, estimated to be 1 clock, 1/168M=6ns.
According to the documentation, EVENTOUT is used for synchronization between multiple ARMs. Compared with GPIO output, GPIO requires at least 3 instructions to output a pulse, and there is a delay in accessing the bus. However, EVENTOUT output only uses one SEV instruction, and the pulse is directly controlled by the kernel with minimal delay. However, this pulse is too narrow and cannot meet the width requirements of my application, so I have to use GPIO.
I haven't tested receiving EVENT, but I saw in the code that the pin MODE can be set to:
#define GPIO_MODE_EVT_RISING ((uint32_t)0x10120000) /*!< External Event Mode with Rising edge trigger detection */
#define GPIO_MODE_EVT_FALLING ((uint32_t)0x10220000) /*!< External Event Mode with Falling edge trigger detection */
#define GPIO_MODE_EVT_RISING_FALLING ((uint32_t)0x10320000) /*!< External Event Mode with Rising/Falling edge trigger detection */
The receiver does not treat EVENT as an interrupt, but as a wake-up signal. Refer to PM0214: 2.5.1 Entering sleep mode in the STM32F3 and STM32F4 Series Cortex-M4 programming manual.
Previous article:Problems with USART baud rate calculation in STM32 library function
Next article:Test the impact of moving the STM32F4 interrupt vector table to internal RAM on interrupt response speed
- 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
- 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)
- Learn ARM development(15)
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- 【Silicon Labs Development Kit Review】+ Unboxing Review
- Re-understanding "Isolation"
- A complete guide to high-efficiency LED driver design
- Why can't we refresh two COM pins at the same time when there are multiple COM pins on the LCD screen?
- If there is a design that does not increase cost and can improve signal quality
- "Operational Amplifier Parameter Analysis and LTspice Application Simulation" 1. LTspice Installation and Reading Notes on Chapter 1
- Just give me the ufun development board and pay the postage.
- EEWORLD University Hall----Live Replay: Smaller, faster, more reliable connectors drive new developments in IoT applications
- Instructions for submitting entries to the 2020 ST MEMS Sensor Creative Design Competition
- Recruiting QT software engineers (PC side), QT software engineers (Linux side), hardware design engineers, R&D test engineers,...