STM32 Configure and Interrupt

Use this section to discuss your embedded Flowcode projects.
liudeqiang_2008
Posts: 23
http://meble-kuchenne.info.pl
Joined: Wed Jan 12, 2022 8:25 am

Re: STM32 Configure and Interrupt

Post by liudeqiang_2008 »

LeighM wrote:
Wed Jun 11, 2025 1:48 pm
I suspect there might already be examples on this or the old forum.
Just some other points...

Presumably you have proved that the hardware is working? Perhaps adding a led flash in the main loop.
Are you using your own hardware design, or a development board?

You have a pull up (or down) resistor on the switched input?

I would also suggest that you keep the interrupt code as short as possible, e.g. just set a flag and then test for it in the main loop and do your printing there
I couldn't even achieve the EXTI Interrupt software simulation in the Debug - Run mode.

liudeqiang_2008
Posts: 23
Joined: Wed Jan 12, 2022 8:25 am

Re: STM32 Configure and Interrupt

Post by liudeqiang_2008 »

LeighM wrote:
Wed Jun 11, 2025 1:48 pm
I suspect there might already be examples on this or the old forum.
Just some other points...

Presumably you have proved that the hardware is working? Perhaps adding a led flash in the main loop.
Are you using your own hardware design, or a development board?

You have a pull up (or down) resistor on the switched input?

I would also suggest that you keep the interrupt code as short as possible, e.g. just set a flag and then test for it in the main loop and do your printing there
To be clear, only STM32F411CEU6 I have downloaded it to a standard development board(Still failed), for the others, I only tested it in the Debug-Run mode. the program will never goes into EXTI macro even when I set the EXTI active button always on and Step into it.

As you mentioned,I changed the program to use a flg in the EXTI Interrupt Macro and an LED on the main loop.
I have tried 4 boards : ESP32(OK),PIC(OK),PICO(NG),STM32(NG). 2 success and 2 failed. The program are all same except the Interrupt pin.
If some want to check, please see below attachment.

I think Flowcode developers should pay attention to this issue.
Or prove me stupid. I still think this is a good example for Flowcode beginners, and I believe there will be people who encounter the same problem as me.

BR, Deqiang
Attachments
IO_Interrupt_Flag_STM32(NG).fcfx
(14.47 KiB) Downloaded 13 times
IO_Interrupt_Flag_ESP32(OK).fcfx
(14.36 KiB) Downloaded 13 times
EXTI0_with_Flag.png
EXTI0_with_Flag.png (216.83 KiB) Viewed 562 times

LeighM
Valued Contributor
Posts: 458
Joined: Mon Dec 07, 2020 1:00 pm
Has thanked: 82 times
Been thanked: 246 times

Re: STM32 Configure and Interrupt

Post by LeighM »

Thanks for the further info.
I'm not sure what support there is for interrupts in simulation mode - one for the Matrix team.
I should be able to find some time next week to provide an EXTI example on STM32F411 hardware

Steve-Matrix
Matrix Staff
Posts: 1509
Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 211 times
Been thanked: 350 times

Re: STM32 Configure and Interrupt

Post by Steve-Matrix »

LeighM wrote:
Fri Jun 13, 2025 5:26 pm
I'm not sure what support there is for interrupts in simulation mode - one for the Matrix team.

Simulation on that type of interrupt is not currently supported. We will look into this and see if it is possible.

liudeqiang_2008
Posts: 23
Joined: Wed Jan 12, 2022 8:25 am

Re: STM32 Configure and Interrupt

Post by liudeqiang_2008 »

Steve-Matrix wrote:
Mon Jun 16, 2025 10:28 am
LeighM wrote:
Fri Jun 13, 2025 5:26 pm
I'm not sure what support there is for interrupts in simulation mode - one for the Matrix team.

Simulation on that type of interrupt is not currently supported. We will look into this and see if it is possible.
Hopefully it can be supported soon.
Looking forward to your update.

BR
Deqiang

Steve-Matrix
Matrix Staff
Posts: 1509
Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 211 times
Been thanked: 350 times

Re: STM32 Configure and Interrupt

Post by Steve-Matrix »

We've looked into this and the attached FCD file should allow the simulation of the pin interrupts on that device.

To try it, please download and place into the following location:

Code: Select all

%ProgramData%\MatrixTSL\FlowcodeV11\FCD\ARM
If this works ok, we will roll out the changes to the other chips in the STM32 range.
Attachments
32F411CE.fcdx
(51.87 KiB) Downloaded 12 times

LeighM
Valued Contributor
Posts: 458
Joined: Mon Dec 07, 2020 1:00 pm
Has thanked: 82 times
Been thanked: 246 times

Re: STM32 Configure and Interrupt

Post by LeighM »

Here's an EXTI demo for the 32F411 BlackPill dev board ...
Attachments
STM32F411BP_LED_EXTI.fcfx
(10.24 KiB) Downloaded 13 times

medelec35
Matrix Staff
Posts: 1991
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 630 times
Been thanked: 663 times

Re: STM32 Configure and Interrupt

Post by medelec35 »

Hello.
The fix has been applied to the ARM devices and should be available via the component library update system.
Martin

liudeqiang_2008
Posts: 23
Joined: Wed Jan 12, 2022 8:25 am

Re: STM32 Configure and Interrupt

Post by liudeqiang_2008 »

medelec35 wrote:
Tue Jun 17, 2025 1:12 pm
Hello.
The fix has been applied to the ARM devices and should be available via the component library update system.
Hello All,

I have replaced the replaced the file"32F411CE.fcdx", have tested the sample project "STM32F411BP_LED_EXTI.fcfx", have finished the component library update.
To be honest, I didn't find any difference, is it all be tested? Is there someone really trigger the EXTI Pin and saw it jumping into the EXTI Marco in both simulation mode and real board?
I have recorded the screen and try to show them, but it is too big to be uploaded.
Sorry, I don't know what else I can do for it. Now I am using Flowcode V10, maybe you are working on V11, but please make sure they are tested on V10 and working well.
Thanks and Wish you the best.

Best regards,
Deqiang

LeighM
Valued Contributor
Posts: 458
Joined: Mon Dec 07, 2020 1:00 pm
Has thanked: 82 times
Been thanked: 246 times

Re: STM32 Configure and Interrupt

Post by LeighM »

Step at a time...
Have you tried the demo on hardware?
It gives a short LED flash every half second.
Gives a long (half second) flash of the LED when the interrupt input is triggered.
What do you see?

Post Reply