Skip to main content
awalti
Associate
March 13, 2023
Solved

SRAM parity flag not set in NMI handler

Hi all

I'm trying to distinguish between the interrupt sources in the NMI handler on a STM32G031 - particularly the RAM parity error.

I have everything in place and I can provoke a parity error. The NMI ISR is called as expected, but if the SYSCFG_CFGR2_SPF is checked in the ISR it is never set (and neither are the other 3 potential NMI sources).

Am I not understanding correctly how this works? Is this flag getting automatically reset upon entry into the ISR (The manual is not totally clear here. For the other flags it explicitly mentions that they need to be cleared manually)?

Thanks for any pointers

A

    This topic has been closed for replies.
    waclawek.jan
    waclawek.janBest answer
    Super User
    March 14, 2023

    Do you have SYSCFG clock set in RCC (by setting RCC_APBENR2.SYSCFGEN)?

    JW

    4 replies

    Billy OWEN
    ST Employee
    March 14, 2023

    Hi @awalti​ 

    The forum moderator had marked your post as needing a little more investigation and direct support. An online support case has been created on your behalf, please stand by for just a moment and you will hear from us.

    Regards,

    Billy

    waclawek.jan
    waclawek.janBest answer
    Super User
    March 14, 2023

    Do you have SYSCFG clock set in RCC (by setting RCC_APBENR2.SYSCFGEN)?

    JW

    awalti
    awaltiAuthor
    Associate
    March 16, 2023

    Well, that seems to have done the trick. Thank you!

    This information seems to be quite well hidden in the Ref Manual.

    awalti
    awaltiAuthor
    Associate
    March 16, 2023

    Thanks also to ST support which came up with the same solution but I can't seem to add a comment there.