KS22XXX RTC REGISTER FAULT

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

KS22XXX RTC REGISTER FAULT

930件の閲覧回数
召宝田
Contributor I

Hi,

Now I'm working on KS22xxxx. There is a problem that when I was initializing the RTC module through writing or reading the register of it, the processor would report a HARDWARE FAULT. I'm wondering what I have done have any issues.

Following is my code.

rtc_datetime_t mrtc_datetime_t;

rtc_config_t mrtc_config_t;

memset(&mrtc_datetime_t,0,sizeof(rtc_datetime_t));

RTC_GetDefaultConfig(&mrtc_config);

RTC_Init(RTC,&mrtc_config_t);

RTC_StartTimer(RTC);

0 件の賞賛
返信
1 返信

762件の閲覧回数
mjbcswitzerland
Specialist V

Hi

Before accessing RTC register you need to enable the RTC clock kin SIM_SCGC6. If not, you will have a hard fault.

In addition, VBAT needs to be connected!

Regards

Mark

0 件の賞賛
返信