Skip to main content
Graduate
May 12, 2024
Solved

Information missing in reference manual for register clearing interrupt status on G431

  • May 12, 2024
  • 1 reply
  • 1188 views

There is not information, on how to clear the flag (1 or 0), on register TIMx_SR (x=1,8,20).

I believe there were also other registers where it was not mentioned, how to clear them.

    This topic has been closed for replies.
    Best answer by Tesla DeLorean

    rc_w0 means you write zero to the bit to clear it, ie TIM->SR= 0xFFFFFFFE; clears UIF

    g4_tim_sr.jpg

    "read/clear write0 (rc_w0) Software can read as well as clear this bit by writing 0. Writing 1 has no
    effect on the bit value."

    https://www.st.com/resource/en/reference_manual/rm0440-stm32g4-series-advanced-armbased-32bit-mcus-stmicroelectronics.pdf

    1 reply

    Graduate II
    May 12, 2024

    rc_w0 means you write zero to the bit to clear it, ie TIM->SR= 0xFFFFFFFE; clears UIF

    g4_tim_sr.jpg

    "read/clear write0 (rc_w0) Software can read as well as clear this bit by writing 0. Writing 1 has no
    effect on the bit value."

    https://www.st.com/resource/en/reference_manual/rm0440-stm32g4-series-advanced-armbased-32bit-mcus-stmicroelectronics.pdf

    TobeAuthor
    Graduate
    May 12, 2024

    Page 73 says it all.

     

    Thats a bit embarrasing :grinning_face_with_sweat: