GithubHelp home page GithubHelp logo

gist_stm32-triggered-n-pulse's Introduction

gist: STM32 triggered N pulse

About

  • how to use an advanced timer (TIM1 for F401) to generate N pulses output when receiving a trigger, and
  • How to generate PWM using TIMs

There are more snap shots from CubeMX

To output PWM
  1. Set Mode: Channel? PWM Generation
  2. Counter setting: Prescaler/Counter Period = ?
  3. PWM Generation Channel ? > Pulse = ?
  4. HAL_TIM_PWM_Start(&htim?, TIM_CHANNEL_?)
  5. BE CAREFUL WITH GPIO max speed
To output N pulses after trigger signal
  1. Slave Mode: Trigger Mode
  2. Trigger Source: TI1FP1: TI1(Timer input 1) after FP(filter and polarity selection)
  3. Channel 2: PWM Generation CH2
  4. One Pulse Mode: Enable
  5. Counter Setting > Prescaler/Counter Period = ?
  6. Counter Setting > Repeatition Counter = N pulse
  7. Trigger > Polarity/Filter
  8. PWM Generation Channel 2 > Pulse = ?
  9. HAL_TIM_PWM_Start(&htim?, TIM_CHANNEL_?)
  10. BE CAREFUL WITH GPIO max speed

Reference materials

Datasheet stm32f401re.pdf

F401 resources reference manual dm00096844...

Cortex M4 Programming Manual dm00046982...

gist_stm32-triggered-n-pulse's People

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.