timer interrupt
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-01-01 7:39 AM
hi
I have a stm32f4 discovery board and i use stm32 cube.
I want to create a 400ns interrupt but it doesn't less than 2.5us.
my initialization are:
TimHandle.
Init
.Period
=1
;TimHandle.
Init
.Prescaler
= 0;TimHandle.
Init
.ClockDivision
=0
;can you help me?
thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-01-03 2:24 AM
Hi Mohammad,
All STM32F4 devices give you the ability to create a 400ns interrupt.
Could you please tell me the value of the timer clock you are using.
Khouloud.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-01-03 4:00 AM
Your goal is unrealistic.
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
‎2017-01-03 7:11 AM
Indeed. With the fastest F4 running from SRAM you only have 72 ticks until the next interrupt.
(eg: 400e-9 / (1/180e6) is 72)
You will have the inevitable 2x12 ticks of latency, meaning there are only 48 cycles for your assembly written ISR to perform what it want to do. Worst case you can go up to 54, but you'll be tail-chaining forever.
See this article in the
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0439b/ch03s09s01.html
.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-01-03 7:53 AM
Hi
arabloo.mohammad
I have moved your post to the
where you should post any future product related questions you have.Thanks
Oli
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-01-03 8:48 AM
If this is for modulating an LED driver, use the Hardware to driver the PWM using DMA to load from the pattern buffer.
Period = 1 is problematic too as I recall.
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
‎2017-01-04 3:30 AM
Dear khouloud,
It is 48mhz
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-01-04 3:31 AM
Dear Clive,
why?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-01-04 3:36 AM
Dear Jeron3,
your calculation is correct, but it does not matter
it can't less than 2.5us
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-01-04 5:38 AM
Because at some point you'll hit a ceiling where you saturate the processor with the time it takes to execute the interrupt entry, exit and body code.
Beyond a few hundred KHz you'll be hard pressed to do useful work, figure out how to do those things with hardware assistance.
Up vote any posts that you find helpful, it shows what's working..
