TOP Contributors

  1. MIKROE (2650 codes)
  2. Alcides Ramos (350 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (112 codes)
  5. Chisanga Mumba (90 codes)
  6. S P (73 codes)
  7. dany (71 codes)
  8. MikroBUS.NET Team (35 codes)
  9. NART SCHINACKOW (34 codes)
  10. Armstrong Subero (27 codes)

Most Downloaded

  1. Timer Calculator (136526 times)
  2. FAT32 Library (69722 times)
  3. Network Ethernet Library (55835 times)
  4. USB Device Library (46167 times)
  5. Network WiFi Library (41797 times)
  6. FT800 Library (40982 times)
  7. GSM click (28920 times)
  8. PID Library (26383 times)
  9. mikroSDK (26276 times)
  10. microSD click (25296 times)
Libstock prefers package manager

Package Manager

We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]

< Back
Example

Configuring the TIM1 peripheral to generate 6 Steps

Rating:

0

Author: Mohsen Rahmani

Last Updated: 2012-02-26

Package Version: 1.0.0.0

Example: 1.0.0.0

Category: Timers (Real time clock)

Downloaded: 1189 times

Not followed.

License: MIT license  

This example shows how to configure the STM32 TIM1 peripheral to generate 6 Steps in Keil. پروژه الکترونیک

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "Configuring the TIM1 peripheral to generate 6 Steps" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "Configuring the TIM1 peripheral to generate 6 Steps" changes.

Do you want to report abuse regarding "Configuring the TIM1 peripheral to generate 6 Steps".

  • Information
  • Comments (1)
DOWNLOAD LINK RELATED COMPILER CONTAINS
Other ARM Compilers
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc

Example Blog

/******************** (C) COPYRIGHT 2008 STMicroelectronics ********************
* File Name : readme.txt
* Author : MCD Application Team
* Version : V2.0.1
* Date : 06/13/2008
* Description : Description of the TIM 6Steps example.
********************************************************************************
* THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
* CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
*******************************************************************************/

Example description
===================
This example shows how to configure the TIM1 peripheral to generate 6 Steps.
The STM32F10x TIM1 peripheral offers the possibility to program in advance the
configuration for the next TIM1 outputs behaviour (step) and change the configuration
of all the channels at the same time. This operation is possible when the COM
(commutation) event is used.
The COM event can be generated by software by setting the COM bit in the TIM1_EGR
register or by hardware (on TRC rising edge).
In this example, a software COM event is generated each 100 ms: using the SysTick
interrupt.
The TIM1 is configured in Timing Mode, each time a COM event occurs, a new TIM1
configuration will be set in advance.

The break Polarity is used at High level.

The following Table describes the TIM1 Channels states:

-----------------------------------------------
| Step1 | Step2 | Step3 | Step4 | Step5 | Step6 |
----------------------------------------------------------
|Channel1 | 1 | 0 | 0 | 0 | 0 | 1 |
----------------------------------------------------------
|Channel1N | 0 | 0 | 1 | 1 | 0 | 0 |
----------------------------------------------------------
|Channel2 | 0 | 0 | 0 | 1 | 1 | 0 |
----------------------------------------------------------
|Channel2N | 1 | 1 | 0 | 0 | 0 | 0 |
----------------------------------------------------------
|Channel3 | 0 | 1 | 1 | 0 | 0 | 0 |
----------------------------------------------------------
|Channel3N | 0 | 0 | 0 | 0 | 1 | 1 |
----------------------------------------------------------

پروژه الکترونیک طراحی و توسعه سیستم های مانیتورینگ و اتوماسیون صنعتی متلب مطلب طراح الکترونیک و توسعه دهنده و برنامه نویس الکترونیک کنترل شبکه امنیت میکروکنترلر پروژه الکترونیک میکروکنترلر آرم اتمل فیلیپس میکروچیپ اینترفیس ویژوال استادیو
AVR PIC 8086 z80 ARM LPC STM32 PCB ARM AVR PIC MicroController Electronic Project GPRS GSM USB BlueTooth Ethernet Network CAN I2C SPI RS485 Automation PLC

Directory contents
==================
stm32f10x_conf.h Library Configuration file
stm32f10x_it.c Interrupt handlers
stm32f10x_it.h Interrupt handlers header file
main.c Main program


Hardware environment
====================
This example runs on STMicroelectronics STM3210B-EVAL and STM3210E-EVAL evaluation
boards and can be easily tailored to any other hardware.
There is no need for any modification when switching between these two boards.

- Connect the TIM1 pins to an oscilloscope to monitor the different waveforms:
- TIM1_CH3 pin (PA.10)
- TIM1_CH1N pin (PB.13)
- TIM1_CH2 pin (PA.09)
- TIM1_CH3N pin (PB.15)
- TIM1_CH1 pin (PA.08)
- TIM1_CH2N pin (PB.14)

- Connect the TIM1 break pin TIM1_BKIN pin (PB.12) to the GND. To generate a break
event, switch this pin level from 0V to 3.3V.


How to use it
=============
In order to make the program work, you must do the following:
- Create a project and setup all your toolchain's start-up files
- Compile the directory content files and required Library files:
+ stm32f10x_lib.c
+ stm32f10x_tim.c
+ stm32f10x_gpio.c
+ stm32f10x_rcc.c
+ stm32f10x_nvic.c
+ stm32f10x_flash.c
+ stm32f10x_systick.c

- Link all compiled files and load your image into target memory
- Run the examplee

RELATED CODES

RTC real Time Clock on MMB for PIC32

0

starts the 32KHz oscillator, the RTC module and with the touchpanel it is possible to set the calendar and clock This little projact is written in VTFT and basic and uses the finite stata machine method with the case statement

[Learn More]

Recording time in RTC Click with Mikromedia for ATmega

0

Cyrillic graphical interface for recording the date and time in RTC PCF8583, + adjust the backlight TFT save in eeprom MCU :) + picture, graphic, Cyrillic koi8 fonts in *.RES-file from SD-card. http://youtu.be/mCCeKzurVi4

[Learn More]

Cyclic On-Off Timer with MSP430 and TTP224 Capacitive Touchpad

0

Cyclic On-Off Timer with MSP430G2452 and TTP224 Capacitive Touchpad. https://www.youtube.com/watch?v=Xzshszn_8w4

[Learn More]