Test STM32F4 Evnetout

Source: Internet
Author: User

See a lot of pins can be configured as Eventout, just have a pin to output a high-level pulse, tested a bit:

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);


Pulse output is a function defined in Intrinsics.h:

__setv ();


Output waveform:

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/70/54/wKiom1W2Ru3Cq1hXAAlIvrfB1QE298.jpg "title=" C0645ed4e41e57f11af279f51c3ae5f8.jpg "alt=" Wkiom1w2ru3cq1hxaalivrfb1qe298.jpg "/>


Oscilloscope sampling rate only in this way, an estimated 1 clocks, 1/168m=6ns.


Eventout uses according to data is used for synchronization between multiple arm. In comparison with the Gpio output, the Gpio outputs a pulse at least 3 instructions, and the access bus has a delay. and the output eventout only with one SEV instruction, the pulse is controlled directly by the kernel, the delay is minimal. However, this pulse is too narrow to meet the width of my application requirements, only the use of Gpio.


The receive event has not been tested, but the pin mode in the code can be set to:

#define Gpio_mode_evt_rising ((uint32_t) 0x10120000)/*!< External Event MODE with RISING Edge trig GER Detection */

#define Gpio_mode_evt_falling ((uint32_t) 0x10220000)/*!< External Event MODE with falling edge Tri Gger Detection */

#define Gpio_mode_evt_rising_falling ((uint32_t) 0x10320000)/*!< External Event MODE with rising/falling E DGE Trigger Detection * *


The receiver does not treat the event as an interrupt, but rather as a wake-up signal. Reference pm0214:stm32f3 and STM32F4 Series CORTEX-M4 programming Manual 2.5.1 Entering sleep mode.






This article is from the "Skywolf blog" blog, make sure to keep this source http://iskywolf.blog.51cto.com/5231583/1678934

Test STM32F4 Evnetout

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.