make a off delay timer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-01-22 7:16 AM
i want to assign a number to parameter in program and check if my parameter is equal to my number , disable a pin after passing a 10 sec.
in the other hand i want to make a off delay timer with HAL library .
i use STM 32 AND KEIL IDE.
- Labels:
-
STM32F1 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-01-22 8:07 AM
Ok
What STM32? There's like a thousand different "STM32"
Running at what frequency?
Using interrupts?
Or polling the TIM count?
Perhaps divide a clock down to 10's of milliseconds, and then count those off to get to 10 seconds.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-01-22 8:27 AM
Stm32f103c8t6
16 MHZ
i want to use internal interrupts .
and please tell me how to start and stop a timer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-01-22 8:34 AM
They have an "Enable" bit, and there is also a One-Shot mode.
Can't you just use a 1ms SysTick, and count off 10,000 ticks? Or make a simple scheduler?
From 16 MHz TIM CLK, using 16-bit Prescaler/Period
Prescaler = 64000-1
Period = 250 - 1
For 1Hz (1 Second)
Prescaler = 64000-1
Period = 2500 - 1
For 0.1Hz (10 Seconds)
An update interrupt will occur at startup (time zero), and every time it subsequently wraps.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-01-22 8:36 AM
Homework?
Did you already do a blinky?
Have you read relevant portions of RM0008?
JW
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-01-25 2:43 AM
just set enable bit to start and clear will stop timer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-01-27 9:45 PM
have you done?
