首页 | 供应信息 | 采购信息 | PDF资料 | 技术资料 | 行业资讯 | 产品展示 | 人才市场 进入会员区
   技术文章分类:单片机/DSP 嵌入式系统 测试仪表 电源技术 接口电路 存储器 传感与控制 通信网络 无线通信 模拟技术 显示与光电 EDA/PLD 汽车电子 消费电子 电子综合
   电子综合工具:PDF资料大全 电子缩略语 IC型号替换 IC厂家 电子电路图 技术参数 设计应用 解决方案
技术资料 行业资讯 PDF资料 IC价格 IC替换 缩略语 IC供应 IC采购
  您所在的位置: IC37首页 > 技术问答 > ZLG-ARM > 请看:按手册的意思,LPC2132的RTC有什么意义呢?

  请看:按手册的意思,LPC2132的RTC有什么意义呢? 

由于 RTC的时钟源为 VPB时钟(pclk),时钟出现的任何中断都会导致时间值的偏移。如果 RTC初始化成这个时间值或从 RTC激活后运行的一段时间内出现了一个错 误,它们带来的变化都将影响真实的时钟时间。

LPC2132/2138在断电时不能保持 RTC的状态。如果时钟源丢失、中断或改变,RTC也无法维持时间计数。芯片的断电将使 RTC寄存器的内容完全丢失。进入掉电模式会使时间的更新出现误差。在系统操作过程中(重新配置 PLL、VPB定时器或 RTC预分频器)改变 RTC的时间基准会使累加时间出现错误。

Since the RTC operates from the VPB clock (pclk), any interruption of that clock will cause the time to drift away from the time value it would have provided otherwise. The variance could be to actual clock time if the RTC was initialized to that, or simply an error in elapsed time since the RTC was activated.

No provision is made in the LPC2132/2138 to retain RTC status upon power loss, or to maintain time incrementation if the clock source is lost, interrupted, or altered. Loss of chip power will result in complete loss of all RTC register contents. Entry to Power Down mode will cause a lapse in the time update. Altering the RTC timebase during system operation (by reconfiguring the PLL, the VPB timer, or the RTC prescaler) will result in some form of accumulated time error.


作者:pheavecn  2005-1-27 20:54:00

  回复1  如果使用RTC独立晶振和独立电源就没有问题了335716

如果使用RTC独立晶振和独立电源就没有问题了
作者:zlgARM  2005-1-28 8:22:00

  回复2  可是VPB时钟来自主时钟cclk呀。335717

斑竹似乎也是半懂不懂。

我的看法,RTC应该在32768 OSC和Vbat正常的情况就独立运行。

可是手册中给RTC引入了太多无关的东西:VPB、PLL、pclk。

“LPC2132/2138在断电时不能保持 RTC的状态”中的断电不知指的断哪个“电”?

希望周立功找个高手,把手册中RTC这一段的意思写的明白、精确些。


作者:pheavecn  2005-1-28 9:51:00

  回复3  re.335718

如果您仔细阅读过用户指南的话会发现,RTC既可以使用独立时钟源,也可以使用PCLK分频后的时钟源(兼容原来的芯片)。

这里的“电”当然是RTC部分的电。


作者:zlgARM  2005-1-28 13:00:00

  回复4  唉,该资料应该被称为:“用户指东西南北”。335719

语句极不精确。

看的人糊里糊涂。

跟台湾义隆的资料有的一拼。

我有个项目用义隆芯片,就完全靠自己摸芯片特性。相信现在义隆公司的大部分人员都没我懂那颗芯片。

我还是等几个月再来玩LPC2XXX。


作者:pheavecn  2005-1-28 21:43:00

  回复5  唉,还不知最后版本的正式发布资料改成啥样!335720

If the RTC is used, Vbat must be connected to either pin V3 or an independent power supply (external battery). Otherwise, Vbat

should be tied to the ground (Vss). No provision is made in the LPC2131/2132/2138 to retain RTC status upon the Vbat power

loss, or to maintain time incrementation if the clock source is lost, interrupted, or altered.

Since the RTC operates using one of two available clocks (the VPB clock (pclk) or the 32 kHz signal coming from the RTCX1-2

pins), any interruption of the selected clock will cause the time to drift away from the time value it would have provided otherwise.

The variance could be to actual clock time if the RTC was initialized to that, or simply an error in elapsed time since the RTC was

activated.

While the signal from RTCX1-2 pins can be used to supply the RTC clock at anytime, selecting the pclk as the RTC clock and

entering the Power Down mode will cause a lapse in the time update. Also, feeding the RTC with the pclk and altering this

timebase during system operation (by reconfiguring the PLL, the VPB divider, or the RTC prescaler) will result in some form of

accumulated time error. Accumulated time errors may occur in case RTC clock source is switched between the pclk to the RTCX

pins, too.

Once the 32 kHz signal from RTCX1-2 pins is selected as a clock source, the RTC can operate completely without the presence

of the VPB clock (pclk). Therefore, power sensitive applications (i.e. battery powered application) utilizing the RTC will reduce

the power consumption by using the signal from RTCX1-2 pins, and writing a 0 into the PCRTC bit in the PCONP power control

register (see "Power Control" section in the "System Control Block" chapter).

Table 162: Alarm Registers

Address Name Size Description Access

0xE0024060 ALSEC 6 Alarm value for Seconds R/W

0xE0024064 ALMIN 6 Alarm value for Minutes R/W

0xE0024068 ALHOUR 5 Alarm value for Hours R/W

0xE002406C ALDOM 5 Alarm value for Day of Month R/W

0xE0024070 ALDOW 3 Alarm value for Day of Week R/W

0xE0024074 ALDOY 9 Alarm value for Day of Year R/W

0xE0024078 ALMON 4 Alarm value for Months R/W

0xE002407C ALYEAR 12 Alarm value for Years R/W

Real Time Clock 216 November 22, 2004

Philips Semiconductors Preliminary User Manual

LPC2131/2132/2138 ARM-based Microcontroller

REFERENCE CLOCK DIVIDER (PRESCALER)

The reference clock divider (hereafter referred to as the Prescaler) allows generation of a 32.768 kHz reference clock from any

peripheral clock frequency greater than or equal to 65.536 kHz (2 x 32.768 kHz). This permits the RTC to always run at the proper

rate regardless of the peripheral clock rate. Basically, the Prescaler divides the peripheral clock (pclk) by a value which contains

both an integer portion and a fractional portion. The result is not a continuous output at a constant frequency, some clock periods

will be one pclk longer than others. However, the overall result can always be 32,768 counts per second.

The reference clock divider consists of a 13-bit integer counter and a 15-bit fractional counter. The reasons for these counter

sizes are as follows:

1. For frequencies that are expected to be supported by the LPC2131/2132/2138, a 13-bit integer counter is required. This

can be calculated as 160 MHz divided by 32,768 minus 1 = 4881 with a remainder of 26,624. Thirteen bits are needed to

hold the value 4881, but actually supports frequencies up to 268.4 MHz (32,768 x 8192).

2. The remainder value could be as large as 32,767, which requires 15 bits.


作者:agnd  2005-1-29 0:29:00

  回复6  楼上的资料从哪里搞来的呀?!335721

似乎说的清楚一些。


作者:pheavecn  2005-1-29 19:07:00

  回复7  毕竟人家的目语也不是英文嘛335722

我们来写,估计也不会有什么过人的。

这点要理解,将心比心。


作者:whf_27  2005-1-30 21:47:00

  回复8  问过zlg支持了:LPC213x在独立Vbat和晶振下可-掉MCU电-工作。335723

有板子的人做一下这方面的试验吧。

用事实说话。philips以前的片上RTC就是这样鸡肋了。你看飞用ARM的手机,哪一个去了电池还会走时。

建议悬赏给做试验的人加分。


作者:marphone  2005-1-30 23:38:00

  回复9  To:whf_27.我指的就是英文资料呀.335724

没要求中文资料写清楚呀.

至于问周立功的支持,我认为可信度不高.这是我的经验.


作者:pheavecn  2005-1-31 11:09:00

  回复10  没有人做试验吗,我来替ZLG做吧,成本是一块PCB,我没有2132开发板335725

没有人做试验吗,我来替ZLG做吧,成本是一块PCB,我没有2132开发板
作者:marphone  2005-2-3 11:01:00

  回复11  完了完了,实验结果令人失望!!335726

用独立晶振和Vbat,把ARM VDD完全断电,RTC根本不会继续走时!且有时停在掉电时刻不动,有时就完全乱了!!!

结论:这个RTC趁早别用!建议厂家如果不能改进还是把它取销把!!!


作者:agnd  2005-2-20 15:58:00

  回复12  philips的文档写得差这是众所皆知的!335727

与周立功公司无关。就算周立功公司理解得比文档上说的更深刻一些,也不好在中文文档里添写啊。这可是要承担法律与商业风险的。

这就叫先天不足,后天难补!


作者:andrewpei  2005-2-21 8:46:00

  回复13  希望楼上的网友确保您的实验板硬件正常,并请您把测试程序贴出335728

我们早就做过RTC部件的测试并没有发现您提及的问题。在该贴开始时就说了RTC使用独立晶振和独立电源后就可以独立工作,只是部分网友采取不信任的态度。

在程序中要注意设置CCR寄存器,它里面有一位用于控制是否使用独立晶振。


作者:zlgARM  2005-2-21 9:48:00

  回复14  我们全部都做过验证,不仅仅是实验而已!(周立功)335729

我们不仅即将推出EasyARM2131开发套件及其配套的图书《深入浅出ARM7--LPC213x/214x》(上、下),而且我们投资的另一个公司广州致远电子有限公司“金卡事业部”还用LPC2138做出了产品--基于以太网的两门门禁控制器,我们没有使用外置的日历时钟芯片,而恰恰是使用了LPC2138的内部RTC功能部件。

事实上,从PHILIPS推出LPC2104开始,我们比各位更关心它的RTC功能部件的设计与使用,因为几年来我们销售的PCF8563日历时钟芯片早超过了1000万片,我们拥有更加广泛的客户群。

请各位遇到问题先做好实验不要忙于下结论,如果自己实在搞不定可以先与我们联系,便于我们及时验证和支持您的开发。


作者:zlgarm  2005-2-21 18:58:00

  回复15  非常抱歉,周老师说的对,是我弄错了335730

由于本人试验时条件限制,硬件是用以前焊LPC2114的板子改的,因为我看2114和2132管脚大部分兼容,而Vbat

的49脚正好是原来接1.8V的,就简单的把原来1.8V电断开改接了两节5号电池,同时把独立晶振直接焊到了3、5

腿附近的过孔上,却忘了以前板上p23还接着其他东西,结果独立晶振根本没起振。但芯片主电源有电时怎么能

正常走时呢?原来试验软件也有问题,正如周老师说的,我根本没管CCR寄存器的事!

本人于是改正错误,并重做以上试验,特别还注意了断电,就要断的彻底,为放光板上VDD电容的电,把VDD和GND短路一分钟,结果,时钟靠Vbat维持毫无影响!LPC2132就是牛!

因此,本人郑重向受此贴影响的网友道歉。


作者:agnd  2005-2-25 21:31:00


我要投稿 注册会员
客服咨询热线:0755-26000950 0755-26007355
 相关技术问答
·程序不能下载到FLASH  2005-1-27
·ARM单片机和DSP速度差..  2005-1-27
·请问lpc211x与 lp..  2005-1-27
·很郁闷啊,坏了2块了  2005-1-27
·请教!做3C时测电磁辐射时..  2005-1-27
·周工给您教程的建议  2005-1-27
·如何向寄存器里写一个32位..  2005-1-27
·谁发一个2114读写PCF..  2005-1-27
·关于初始化的问题,请教周立..  2005-1-27
·没搞错吧!2132的p0...  2005-1-27
·斑竹:请问那有注视详细的启..  2005-1-27
·我的2200为什么下载不了..  2005-1-27
·咨询lpc2138  2005-1-27
·usb现在行了,但是加了一..  2005-1-27
·LPC2119的程序可以不..  2005-1-27
·初学,存储器应用问题  2005-1-27
·请问2114/2124的I..  2005-1-28
·请问 2114 系列213..  2005-1-28
·ISP正常 &n..  2005-1-28
·Error:(Seriou..  2005-1-28
·周老师,请教一个关于eas..  2005-1-28
·这样的定时时序对吗  2005-1-28
·发表你的看法:一个软件开发..  2005-1-28
·各位大侠,2104的实验程..  2005-1-28
·设置堆栈指针要禁止中断吗?  2005-1-28
·怎样使CPU内部运行在4倍..  2005-1-28
·JTAG调试LPC2100..  2005-1-28
 
 热门IC
UCC3813D-5  HA118162NT  ATF1500A-10JC  AD632SH  UT621024PC-70LL  MC143120E2DW  SN74LVC16374ADGGR  HCPL4661  XC17S15APD8C  LVTH16374  DM74LS74ASJ  HM6267P-35  AD5342BRU  MC3399DW  2SA1213  LTC2051HMS8  16221256  CL-MD4450C-SC-B  M52063SP  VN800S  SN74CBTD3384DW  DAC89-002X  TDA8841  NJM2235D  AD8013AR-14-REEL  ISPLSI1016-80LJI  SW-259TR  RPT82FQ  TA8835F  HY57V283220TP-6  LT1395CS8  D82353N7  PCA9532PW  D6600  74S138  EM636165TS-6  ADC5622  UPC1093G  74LCX08MTC  MC1472P1  LTC1694IS5  TDA1029  STV0680B-001  BU2099FV-E2  UA7812  25040N  MAX809MEURT  KA7809TU  TC74HC174AP  LP2988AIMM-3.0