Page 2 of 3

Re: STM32 Configure and Interrupt

Posted: Fri Jun 13, 2025 2:17 pm
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.

Re: STM32 Configure and Interrupt

Posted: Fri Jun 13, 2025 2:19 pm
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

Re: STM32 Configure and Interrupt

Posted: Fri Jun 13, 2025 5:26 pm
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

Re: STM32 Configure and Interrupt

Posted: Mon Jun 16, 2025 10:28 am
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.

Re: STM32 Configure and Interrupt

Posted: Mon Jun 16, 2025 12:35 pm
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

Re: STM32 Configure and Interrupt

Posted: Mon Jun 16, 2025 2:23 pm
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.

Re: STM32 Configure and Interrupt

Posted: Mon Jun 16, 2025 8:35 pm
by LeighM
Here's an EXTI demo for the 32F411 BlackPill dev board ...

Re: STM32 Configure and Interrupt

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

Re: STM32 Configure and Interrupt

Posted: Wed Jun 18, 2025 2:38 pm
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

Re: STM32 Configure and Interrupt

Posted: Wed Jun 18, 2025 3:28 pm
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?