Skip to main content
mohammad arabloo
Associate
January 1, 2016
Question

timer interrupt

  • January 1, 2016
  • 9 replies
  • 1938 views
Posted on January 01, 2017 at 16:39

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

    This topic has been closed for replies.

    9 replies

    Khouloud GARSI
    ST Employee
    January 3, 2017
    Posted on January 03, 2017 at 11:24

    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.

    mohammad arabloo
    Associate
    January 4, 2017
    Posted on January 04, 2017 at 11:30

    Dear khouloud,

    It is 48mhz

    Tesla DeLorean
    Guru
    January 3, 2017
    Posted on January 03, 2017 at 13:00

    Your goal is unrealistic.

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    Jeroen3
    Senior
    January 3, 2017
    Posted on January 03, 2017 at 15:11

    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

    .
    mohammad arabloo
    Associate
    January 4, 2017
    Posted on January 04, 2017 at 11:36

    Dear Jeron3,

    your calculation is correct, but it does not matter

    it can't less than 2.5us

    Oliver Beirne
    Associate II
    January 3, 2017
    Posted on January 03, 2017 at 16:53

    Hi

    arabloo.mohammad

    I have moved your post to the

    https://community.st.com/community/stm32-community/stm32-forum?sr=search&ampsearchId=172c65f8-4e7d-4345-9952-242faac28f6d&ampsearchIndex=0

    where you should post any future product related questions you have.

    Thanks

    Oli