This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

dm365 rtc

大家好!

     dm365内部有一个rtc,我通过改LINUX驱动,dm365内部的rtc可以设置和运行。

    但是当reboot之后时间就被复位了。

   于是我用示波器检查了一下rtc的各个引脚,在reboot期间,各个引脚都没变化,感觉和这个没有关系。

    然后我在网上查了一下,说这个是dm365 rtc的缺陷,它不能保存时间。

   但是我们领导需要官方的确认。希望你们能给出回复。谢谢!

  • 补充一下

        
    从这个说明,dm36x rtc确实是有问题。
    我想进步确定,这个问题是dm365内部的问题,还是硬件电路的问题。
    可以使用dm365内部的rtc吗?还是必须外扩一个rtc呢? 望回复。

  • 你好,

    请问你的reboot,是纯粹软件的的重启,还是WDT重启,还是有外部reset信号给DM36x复位重启?

    PRTCSS设计的是使用的是Normal Mode还是External Reset Mode?

  • 你好!

        谢谢你的回复。

        (1)在串口终端输入“reboot”命令让系统重新启动(电源没有断)。

        (2)PWRST为0,PWRCNTON为1,即:PRTCSS设计成External Reset Mode,

                  如果是Normal Mode模式的话,系统就进入死循环了。

  • 你好,

    请问在串口终端输入“reboot”命令,是否会调用WDT,或者外部reset信号?

  • 你好!

         我刚才确定了一下,在输入reboot之后,系统走到

         davinci_watchdog_reset这个函数中,所以可以肯定是用WDT实现reboot的。

  • 你好!

    我刚才确认了一下,当输入reboot之后,

    系统走到davinci_watchdog_reset这个函数。

    所以确认是WDT实现的。

  • 你好,

    我认为是WDT复位导致的RTC复位,你可以关闭看门狗再reboot测试来确认。

  • 你好!

    您怀疑是WDT引起的。

    我就用了一下外部的reset键,这样就不经过WDT了,

    但是还是不能保存时间。接下来该做什么实验呢?

    望指教。

  • 你好,

    外部Reset信号一定是不行的,请参考文档对External Reset Mode的描述。

    1.4.2 External Reset Mode
    The PRTCSS will work in this mode if the PWRCNTON input pin is held at 1 and the PWRST pin is held
    at 0. Power on/off and reset for the DM36x device should be done externally, as the PRTCSS has no
    control over them. The device reset signal (RESETz) will reset the PRTCSS. The SEQ cannot be used in
    this mode.

    如果要使用外部reset,然后要保留RTC的信息,你需要PRTCSS使用normal mode。

  • 你好!

    我知道了,谢谢!,我还有疑虑,如果把wdt关了,请问我用什么来复位系统呢?

  • 你好,

    我认为最好还是需要PRTCSS使用normal mode来解决该问题。

  • 你好!

    在External Reset Mode模式下有没有方法解决呢?

  • 或者在External Reset Mode是不是reboot之后就不能保存时间?

  • minglang tang 说:

    或者在External Reset Mode是不是reboot之后就不能保存时间?

    不能复位DM36x才能保留RTC信息。

  • 您好。这个要在那个文件改啊。要设置成normal mode??

  • 放弃了,我们用外部的rtc了。

  • 你好,

    需要修改硬件设计。

    kylin zeng1 说:

    您好。这个要在那个文件改啊。要设置成normal mode??

  • 您好。初始化成Normal Mode ,我看了datasheet,如下,这些是要硬件上的修改???不是用软件来初始化的吗???

    PRTCSS Initialization Sequence in Normal Mode
    The following section provides the procedure for initializing the PRTCSS in normal mode:
    1. Ensure the PRTCSS module is in reset by clearing the PWRST and PWRCNTON signals to 0.
    2. Provide the power for the PRTCSS block.
    3. Set PWCTRIO0 pin to ‘0’.
    4. Input ‘1’ to the reset signal for PRTCSS (PWRST) after the 32.768 kHz oscillator is stable.
    5. Input ‘1’ to the reset pin for system power sequencing (PWRCNTON) to start the sequencer of the
    power control block.
    The Sequencer performs the following steps:
    6. Outputs ‘1’ on the PWCTRO1 pin. This signal must be used to control the power IC that supplies
    power to the DM36x device.
    7. Outputs ‘1’ on the PWCTRO0 pin. This signal connects to the DM36x RESETz pin after the stable time
    of the main clock oscillator.
    8. Enables the PRTCSS WDT.
    9. Outputs ‘0’s (after expiration of WDT (16 sec)) on the PWCTRO0/1 to control power off.
    The DM36x device must stop the PRTCSS WDT by clearing the WEN bit in the RTC control register
    (RTC_CTRL) within 16 sec after DM36x comes out of reset. Otherwise, the sequencer will execute the
    power-off sequence for the device.

  • 你好,

    请问如何用软件给PWRST/PWRCNTO引脚输入高电平和低电平?

  • 哦。是哦,谢谢你的回答,不过我常常在rtc卡住了

    我的rtc模块在davinci_rtcss_write(davinci_rtc, 0, DAVINCI_PRTCSS_RTC_INTC_EXTENA1);   这里常常卡住了。

    while (davinci_rtcif_read(davinci_rtc, DAVINCI_PRTCIF_CTLR) & DAVINCI_PRTCIF_CTLR_BUSY)  cpu_relax();

    卡了。是跟rtc模块设置成normal mode或者ExternalMode有关系吗

  • 您好,你说的 “如果是Normal Mode模式的话,系统就进入死循环了。” 这个是当重启的时候进入死循环还是 开机初始化的时候进入死循环啊??

  • 你好,请问一下,DM365开启看门狗后,根据文档上所说就不能关闭看门狗了,reboot也是通过reboot实现的,那使用reboot重启后,为啥可以关闭呢?
  • 请教一下,DM365启动时,偶尔会卡在Starting NAND Copy...这,这可能是什么原因造成的,另外我在UBL中开启了看门狗,那我就只能全程喂狗了么,有什么方法可以关闭呢?
  • user4915846 说:
    你好,请问一下,DM365开启看门狗后,根据文档上所说就不能关闭看门狗了,reboot也是通过reboot实现的,那使用reboot重启后,为啥可以关闭呢?

    这个帖子是讨论RTC的,你的问题是WDT,是两个话题啊?

  • user4915846 说:
    请教一下,DM365启动时,偶尔会卡在Starting NAND Copy...这,这可能是什么原因造成的

    可能性很多,你可以在ubl里面多添加一些打印。DDR的参数是否有根据你使用的DDR芯片调整过? DDR降低频率是否有改善?

    user4915846 说:
    另外我在UBL中开启了看门狗,那我就只能全程喂狗了么,有什么方法可以关闭呢?

    除了硬件复位,只有看门狗计时超时。

    Disabling Watchdog Timer DM365 - Processors forum - Processors - TI E2E support forums

    e2e.ti.com
    It is possible to temporarily disable the watchdog timer on DM365? I am enabling it by writing 0xA5C64000 followed by 0xDA7E4000 (WDKEY with WDEN bit set). This

    另,新的问题,建议你新开一个帖子。

  • 你好,针对ubl启动时卡在Starting NAND Copy..,我想使用一个定时器中断,如果启动超过该时间就复位,请问有DM365定时器中断的例子么,我在Ubl中添加了定时器中断,但是无法产生中断,不知道什么原因。