Thanks for the info, interesting.
What was the result of the main loop LED flash when running on HSE (crystal)?
EXTI Interrupt Issue on STM32
-
- Valued Contributor
- Posts: 486
- http://meble-kuchenne.info.pl
- Joined: Mon Dec 07, 2020 1:00 pm
- Has thanked: 83 times
- Been thanked: 260 times
-
- Posts: 52
- Joined: Wed Jan 12, 2022 8:25 am
- Has thanked: 10 times
- Been thanked: 1 time
Re: EXTI Interrupt Issue on STM32
The main loop LED flash running ok with HSE.
Br, Deqiang
- Attachments
-
- Flowcode1-3.fcfx
- (16.09 KiB) Downloaded 71 times
-
- Valued Contributor
- Posts: 486
- Joined: Mon Dec 07, 2020 1:00 pm
- Has thanked: 83 times
- Been thanked: 260 times
Re: EXTI Interrupt Issue on STM32
Thanks. So, just to confirm what I think you are reporting, with your latest program...
running on HSE...
The main loop flash (1 second on, 1 second off) runs OK, even when the hardware is power cycled.
But the timer interrupt flash often runs much slower when power cycled, but runs OK following program flash and run.
running on HSI...
All works as expected, on reset and on power cycle.
Thanks for your reply, it helps narrow down the possible scenarios.
Might be worth try adding a delay at the start of main, before the interrupt setup?
running on HSE...
The main loop flash (1 second on, 1 second off) runs OK, even when the hardware is power cycled.
But the timer interrupt flash often runs much slower when power cycled, but runs OK following program flash and run.
running on HSI...
All works as expected, on reset and on power cycle.
Thanks for your reply, it helps narrow down the possible scenarios.
Might be worth try adding a delay at the start of main, before the interrupt setup?
-
- Posts: 52
- Joined: Wed Jan 12, 2022 8:25 am
- Has thanked: 10 times
- Been thanked: 1 time
Re: EXTI Interrupt Issue on STM32
Yes, what you summed is corect.LeighM wrote: ↑Thu Aug 14, 2025 10:46 amThanks. So, just to confirm what I think you are reporting, with your latest program...
running on HSE...
The main loop flash (1 second on, 1 second off) runs OK, even when the hardware is power cycled.
But the timer interrupt flash often runs much slower when power cycled, but runs OK following program flash and run.
running on HSI...
All works as expected, on reset and on power cycle.
Thanks for your reply, it helps narrow down the possible scenarios.
Might be worth try adding a delay at the start of main, before the interrupt setup?
For your suggestion, I have add the delay:
1, 10ms before all the interrupts
2, 50ms before all the interrupts
3,100ms before all the interrupts
4,100ms before each the interrupts
Looks no different. it didn't help.
Br, Deqiang
- Attachments
-
- 屏幕截图 2025-08-16 113626.png (209.88 KiB) Viewed 2105 times
-
- Flowcode1-4.fcfx
- (16.42 KiB) Downloaded 134 times
-
- Valued Contributor
- Posts: 486
- Joined: Mon Dec 07, 2020 1:00 pm
- Has thanked: 83 times
- Been thanked: 260 times
Re: EXTI Interrupt Issue on STM32
Thanks for the feedback.
Although I can't see what the problem might be, especially if the main loop LED flash is correct in all cases, which implies that the system clock is setup OK and running as expected.
Why the timer interrupt should differ between using HSE and HSI as a source is eluding me at the moment.
I was initially suspecting crystal startup or crystal frequency issues.
btw. The maximum clock rate for APB1, as used by these timers, is 36MHz, but you do seem to have set that correctly in the config.
Maybe it's worth a test at /4 just to see if that improves things?
Could you provide further information on the hardware used?
I don't have any F3 hardware (I've done numerous projects with F4)
Hopefully Matrix, or others, have an F3 development board and some available time to see if they can replicate the issue?
Although I can't see what the problem might be, especially if the main loop LED flash is correct in all cases, which implies that the system clock is setup OK and running as expected.
Why the timer interrupt should differ between using HSE and HSI as a source is eluding me at the moment.
I was initially suspecting crystal startup or crystal frequency issues.
btw. The maximum clock rate for APB1, as used by these timers, is 36MHz, but you do seem to have set that correctly in the config.
Maybe it's worth a test at /4 just to see if that improves things?
Could you provide further information on the hardware used?
I don't have any F3 hardware (I've done numerous projects with F4)
Hopefully Matrix, or others, have an F3 development board and some available time to see if they can replicate the issue?
-
- Posts: 52
- Joined: Wed Jan 12, 2022 8:25 am
- Has thanked: 10 times
- Been thanked: 1 time
Re: EXTI Interrupt Issue on STM32
What type of F4 MCU you are using the most, perhaps I'd better gave up F3, and move to F4 , there is too much small bugs on F3 support...LeighM wrote: ↑Sat Aug 16, 2025 5:20 pmThanks for the feedback.
Although I can't see what the problem might be, especially if the main loop LED flash is correct in all cases, which implies that the system clock is setup OK and running as expected.
Why the timer interrupt should differ between using HSE and HSI as a source is eluding me at the moment.
I was initially suspecting crystal startup or crystal frequency issues.
btw. The maximum clock rate for APB1, as used by these timers, is 36MHz, but you do seem to have set that correctly in the config.
Maybe it's worth a test at /4 just to see if that improves things?
Could you provide further information on the hardware used?
I don't have any F3 hardware (I've done numerous projects with F4)
Hopefully Matrix, or others, have an F3 development board and some available time to see if they can replicate the issue?
Thank you
Br, Deqiang
-
- Valued Contributor
- Posts: 486
- Joined: Mon Dec 07, 2020 1:00 pm
- Has thanked: 83 times
- Been thanked: 260 times
Re: EXTI Interrupt Issue on STM32
I'm not using anything at the moment
Despite retirement, I don't seem to have much spare time.
I've used 205/405 in the past, but don't have any of that hardware now.
So I wouldn't let that sway you.
btw. Did you do any tests at a lower APB1 timer clock speed?
I did wonder if you are getting erratic behavior due to being at the max edge.

I've used 205/405 in the past, but don't have any of that hardware now.
So I wouldn't let that sway you.
btw. Did you do any tests at a lower APB1 timer clock speed?
I did wonder if you are getting erratic behavior due to being at the max edge.
-
- Posts: 52
- Joined: Wed Jan 12, 2022 8:25 am
- Has thanked: 10 times
- Been thanked: 1 time
Re: EXTI Interrupt Issue on STM32
HelloLeighM wrote: ↑Wed Aug 20, 2025 3:26 pmI'm not using anything at the momentDespite retirement, I don't seem to have much spare time.
I've used 205/405 in the past, but don't have any of that hardware now.
So I wouldn't let that sway you.
btw. Did you do any tests at a lower APB1 timer clock speed?
I did wonder if you are getting erratic behavior due to being at the max edge.
I have tested with 36MHz on APB1, the result is the same, this is not the reason.
Br, Deqiang