Testing STM32F4 EVNETOUT

Publisher:painterLatest update time:2016-10-14 Source: eefocusKeywords:STM32F4  EVNETOUT Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
I saw that many pins can be configured as EVENTOUT. There happened to be a pin that wanted to output a high-level pulse, so I tested it:

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:

wKiom1W2Ru3Cq1hXAAlIvrfB1QE298.jpg

 

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.

Keywords:STM32F4  EVNETOUT Reference address:Testing STM32F4 EVNETOUT

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

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号