Skip to main content
Visitor II
December 12, 2024
Question

Problem with software interrupt on STM32H563

  • December 12, 2024
  • 1 reply
  • 1194 views

Hello the comminity.

I try to use a software interrupt with no secure and no privilege.
when I set a bit in EXTI_SWIER1 And re-read the register, the value stay to 0.

When the interrupt was fired, It's impossible to distinguish the software interrupt  from external input.

On the F4 series the EXTI_SWIER1 contained the bit who call the interrupt.

Is it another methode to do that ?

Regards

    This topic has been closed for replies.

    1 reply

    Technical Moderator
    December 12, 2024

    Hello @lozzz and welcome to the community,

    This is what the reference manual of the product says for SWI bits in EXTI_SWIER register:

    SofLit_0-1734017949304.png

     

    lozzzAuthor
    Visitor II
    December 12, 2024

    Hello, SofLit

    Sorry I'am not seen !!

    In that case, how can distinguish the software interrupt from external input in the EXTI handler ?
    Regards

    Technical Moderator
    December 12, 2024

    Maybe try to read EXTI_RPR and EXTI_FPR registers and check if one of the bits for a given EXTI line is set. If none of them are not set it came from software.