Skip to main content
Graduate
December 11, 2023
Question

RTC seems to be always enabled - hard fault

  • December 11, 2023
  • 2 replies
  • 2210 views

Hi, 

 

I got a Nucleo F103RB, and I am running the very same software I run on my Nucleo F7ZI, and I am getting this weird hard fault that always. I do not enable RTC, but right before the fault happens, the ICSR register tells there is a pending interrupt, number 3, that is the RTC:

sailorembedded_0-1702337905844.png

I am inside an SVC Handler. I haven't enabled the RTC timer. I have tried to disable it, have also tried handle the interrupt, with no success. Am I being deceived by the debugger? 
Any help is much appreciated,
Thank you.

    This topic has been closed for replies.

    2 replies

    Graduate
    December 11, 2023

    Oh, it might as well as be SysTick, since it is -1 and it only shows the last two bits of the IRQ...

    Graduate
    December 12, 2023

    Nope, it is not.

    Super User
    December 12, 2023

    Subtract 16 from VECTPENDING/VECTACTIVE to find the corresponding IRQn_Type.

    0xE is -2 which is PendSV_IRQn

    0x3 is -13 which is HardFault_IRQn.

     

    Graduate
    December 12, 2023

    Hi, thanks for replying

     

    Than it is warns it is pending a "Hard Fault" ? I was assuming a hard fault would just happen.

    Super User
    December 12, 2023

    Yep, I would have thought so too. It's very interesting. Does it happen eventually if you keep stepping through?

    Regardless, doesn't look RTC related to me.