RTC programed to the wrong time by PE_LDD

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

RTC programed to the wrong time by PE_LDD

1,108 次查看
randenewberry
Contributor IV

How can we stop PE_LDD from overwriting the time in the RTC registers with the values in the PE properties panel on Power up?

Using MK22FX512VLH12 with KDS.

0 项奖励
回复
3 回复数

933 次查看
mjbcswitzerland
Specialist V

Hi Rande

I don't know the PE generated code but I expect that you can simply add a check of the validity of the timer and abort any initialistion (which should only be done when it is has not yet been configured)

if ((RTC_SR & RTC_SR_TIF) != 0) {

    return; // RTC is alread operating so ignore

}

Note however that you will still need to ensure that the clock gate is enabled to the RTC after each reset (and to be able to check its validity) so the code will in fact look more like (similar to the uTasker time management solution):

POWER_UP(6, SIM_SCGC6_RTC);

if ((RTC_SR & RTC_SR_TIF) != 0) {

    return; // RTC is alread operating so ignore

}

// Continue with the configuration...

Regards

Mark

Kinetis: µTasker Kinetis support

K22: µTasker Kinetis FRDM-K22F support / µTasker Kinetis TWR-K22F120M support

Time Management: http://www.utasker.com/docs/uTasker/uTasker_Time.pdf

For the complete "out-of-the-box" Kinetis experience and faster time to market

0 项奖励
回复

933 次查看
randenewberry
Contributor IV

Thank you Mark for the reply. The problem is with PE, and we found a way

to make it work.

Thanks!

Rande Newberry

H-ITT, LLC, a Hyper-Interactive Teaching Technology Company

420 Shearer Blvd.-Cocoa, FL, 32922

PH: 888-322-0089

rande@h-itt.com

0 项奖励
回复

933 次查看
marek_neuzil
NXP Employee
NXP Employee

Hello,

I have provided answer on the same previous question, see Re: rtc resets at powerup.

Best Regards,

Marek Neuzil

0 项奖励
回复