How can I generate timer interrupt for 300 sec STM32L0 series?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-10-07 2:40 AM
Hello
I have used Nucleo-L031K6 dev kit.
How can I generate timer interrupt for 100 sec/500 sec delay?
- Labels:
-
Interrupt
-
RTC
-
STM32L0 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-10-07 7:00 AM
If the period is too long for a single timer, you can cascade two timers in a master/slave fashion. Alternatives are more frequent interrupts and a software counter in the interrupt handler or using the RTC.
hth
KnarfB
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-10-07 11:39 AM
+1
RTC Alarm
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-10-07 1:34 PM
Clock your used timer with slow clock and use prescalers, example clk 8MHz prescaler 65534 use 16bit counter to time 100s
but i dont cleanly understand your question. You need delay or repeated interrupt or wake from low power...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-10-07 7:42 PM
Thanks KnarfB and clive1 for your update.
Can please give some sample code or hint like how can I calculate or configuration?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-10-07 7:45 PM
Thanks MM for your update.
Actually I want to generate timer interrupt. Ex : Require timer interrupt means after 5 min generate interrupt and device enter in to the sleep mode [low power mode].
How can I configure counter parameter setting for timer interrupt?
Can you please give some example how can I configure?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-10-07 7:49 PM
STM32Cube_FW_L0_V1.11.2\Projects\NUCLEO-L031K6\Examples\RTC\RTC_Alarm
'
RTC usually count in seconds,
Read the RTC chapter, it has TWO alarms. pick your time(s) into the future
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-10-07 8:01 PM
Thanks clive1 for your input.
Is it possible using TIM1/TIM2 [general purpose timer]?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-10-07 8:52 PM
(65536 * 65536) / 32,000,000 = 134.217728 seconds, maximal
Depends on what speed you're clocking at, you could interrupt at seconds, and count those elapsing
100 seconds, 100 * 32,000,000 / 64000 = 50000
Prescaler = 64000-1
Period = 50000 - 1
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-10-07 9:53 PM
Thanks clive,
I have configure TIM1 timer.
Please find attached timer configure image. Is configuration right?? can you please confirm.
