Hardfault interrupt while accessing any RTC register of MK22FX512AVLQ12

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Hardfault interrupt while accessing any RTC register of MK22FX512AVLQ12

510 Views
prasannanaik
Contributor III

Hi,

   I am using MK22FX512AVLQ12 microcontroller. While initializing RTC using RTC_Init(RTC_Type *base, const rtc_config_t *config) function from "fsl_rtc.h" file, my code goes to hardfault interrupt.

   On further debugging i found that the code goes to hardfault interrupt when i try to read/write any RTC register.

   I have attached my code for reference, please help in resolving this query.

Thanks & best regards,

Prasanna

Labels (1)
0 Kudos
1 Reply

423 Views
ErichStyger
Senior Contributor V

Is your RTC powered by the external Bat/RTC pin? Otherwise it will hardfault.

I hope this helps,

Erich

0 Kudos