cancel
Showing results for 
Search instead for 
Did you mean: 

How often a peripheral can interrupt STM32 MCU in general? I

Yang Yang
Associate II
Posted on July 05, 2018 at 16:12

How often a peripheral can interrupt the 168MHz STM32F4 series MCU in general? In our senario ADS1282 need to transmit data to MCU on different speed from 4ms interval to 1/4ms interval, and maybe even faster. That means 1000 to 4000 interrupts generated each second. Whether STM32F4 will get a very low efficiency in this case because of too frequently interrupt?

4 REPLIES 4
Posted on July 05, 2018 at 16:28

Beyond 100 KHz you should ask yourself if there is a better way to do something.

Doing things at 1 or 4 KHz should be fine, if hardware allows for automation or decimation, consider applying that. You should also consider priorities/pre-emption levels, and time spent in interrupts.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
henry.dick
Senior II
Posted on July 05, 2018 at 16:46

'

How often a peripheral can interrupt the 168MHz STM32F4 series MCU in general?'

as often as you want: the worst would be to not clear the flag so the execution jumps right back to the isr upon its exit. obviously in that case, the mcu can do nothing else.

a meaningful question would be how fast such ISR can be executed. If you google isr overhead, you will find that the mcu takes some steps before going into the isr, from 20-30 ticks to next to none.

so if you take that into account, a 168Mhz mcu can go as fast as 168Mhz / 30 = 6Mhz max.

as more ticks are added to the isr, that speed goes down further.

Posted on July 05, 2018 at 16:33

thanks for the quick reply

Posted on July 06, 2018 at 02:06

Hi, dhenry

Many thanks to you, it help me a lot.