iMX.93 RTC

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

iMX.93 RTC

2,265 次查看
marcomaioli
Contributor II

We have a problem with the iMX.93 RTC device, it is not working.

Screenshot Tamper.jpg

From linux we send the commands:
dates -s "2025-06-20 15_51:00"'
hwclock -w'
Checking that the set dates work and stay aligned until the device is turned off. OK!

Now we wanted to test the functioning of the RTC by turning off the device:
The clock oscillator kept working.
The voltage on the PIN remained 1.8V and did not change during the power down operation.
We waited 2 minutes
We have re-accessed the device
(During all this phase the voltage on the pin remained 1.8v and the oscillator is always operated).

But the 'hwclock -s' command showed the date of 1970-01-01 0:00:00 while the 'date' command showed the date of 2025-06-20 15_5x:xx; exactly 2 minutes back or the time at which the machine was turned off.

What’s the problem?

标签 (1)
0 项奖励
回复
9 回复数

2,162 次查看
marcomaioli
Contributor II

Hello,
we performed the test by disabling and stopping the service you mentioned, but unfortunately the system behavior did not change.

Here’s a brief summary of the situation:
we're working on a custom board based on the i.MX93, and we want the system to synchronize the time via Ethernet on the first boot. This step has been verified and works correctly.

After that, we power off the board, keeping only the backup power via a 3V coin-cell battery, and disconnect the Ethernet cable. Upon the next power-on, we expect the RTC to retain the previously synchronized time, but this does not happen.

From the hardware side, we've verified that when the board is off (powered only by the backup battery), the 1.8V rail (NVCC_BBSM_1V8) is still present and the RTC crystal (RTC_XTALI and RTC_XTALO) continues oscillating.

During some online research, we came across mentions of the "bsm" parameter for the hwclock command, but the system does not recognize this command.

0 项奖励
回复

2,146 次查看
JorgeCas
NXP TechSupport
NXP TechSupport

Hello,

Could you please share your schematic?

Best regards.

0 项奖励
回复

2,108 次查看
marcomaioli
Contributor II

The '3V_BAT' net provides the supply voltage from the backup battery. This voltage is regulated down to a stable 1.8V using a fixed LDO, resulting in the '1V8_BAT' and 'NVCC_BBSM_1V8' rails.

Using an oscilloscope, we observed ripple in the first few microseconds after the board is powered on through the main supply. To eliminate potential interference from the board’s power architecture, we isolated the circuit and supplied only pin A19 using an external power source. Despite this, the ripple behavior persisted. We therefore conclude that the initial ripple originates from the i.MX93 itself, rather than from our hardware design.

In image (3), it can be seen that the system has correctly initialized the RTC. Image (1) shows the clock status before and after the reboot.
Finally, images (4) and (5) display two oscilloscope traces corresponding to two power cycles of the module.

0 项奖励
回复

2,077 次查看
JorgeCas
NXP TechSupport
NXP TechSupport

Hello,

Thank you for the waveforms, as you can see, there is a lot of ripple in the power rail.

The minimal operating voltage is 1.62V, if the voltage level is less than this, it will cause the RTC information to be lost.

Best regards.

0 项奖励
回复

2,213 次查看
JorgeCas
NXP TechSupport
NXP TechSupport

Hello,

You are following the steps to configure RTC correctly.

Please confirm if the board is connected to internet, systemd-timesyncd daemon is enabled by default and could affect the manual configuration of RTC in your board.

systemctl stop systemd-timesyncd

Best regards.

0 项奖励
回复

2,189 次查看
marcomaioli
Contributor II

Thanks,

but how is possible a bad RTC configuration?

My board is now not connected to internet, we have initialized to a test data and time. During the board was power on there are all ok but when I power off the device, the RTC doesn't work. 

Please give me some ideas to check and verify.

 

0 项奖励
回复

2,179 次查看
JorgeCas
NXP TechSupport
NXP TechSupport

Hello,

Something is wrong with your BBSM power supply.

The date/time should be stored with the process you followed.

I tried to replicate the issue with the FRDM93 board, and it saves the date/time. The way to lose the data was disconnect the board from power (this board does not have a backup power source for BBSM) instead use poweroff command in user space.

Screenshot 2025-06-23 121205.png

systemd-timesyncd daemon enabled by default. It implements an SNTP client and is synchronizing the system clock across the network in background, assuming that the Starter Kit has access to the Internet.

If you do not stop this daemon, could affect the manual RTC configuration.

Best regards.

0 项奖励
回复

1,828 次查看
marcomaioli
Contributor II
Hi Vladan,
we are checked on your evaluation board the internal RTC and the external RTC.
 
On the evaluation board the internal RTC doesn't work. This is my log.

root@imx93evk:~# hwclock --rtc=/dev/rtc0 --hctosys; hwclock -w
Wed Jul 2 08:10:13 UTC 2025

 


root@imx93evk:~# date; hwclock --rtc=/dev/rtc0 --show; hwclock --show
Wed Jul 2 08:10:47 UTC 2025
2025-07-02 08:10:47.165649+00:00
2025-07-02 08:10:48.002792+00:00


power down
wait 4 minutes
power up

root@imx93evk:~# date; hwclock --rtc=/dev/rtc0 --show; hwclock --show
Wed Jul 2 08:10:28 UTC 2025
1970-01-01 00:00:18.608013+00:00
1970-01-01 00:00:19.002834+00:00

root@imx93evk:~# dmesg | grep rtc
[ 1.204965] bbnsm_rtc 44440000.bbnsm:rtc: registered as rtc0
[ 1.211278] bbnsm_rtc 44440000.bbnsm:rtc: setting system clock to 1970-01-01T00:00:00 UTC (0)
[ 1.709755] imx-drm display-subsystem: bound imx-lcdifv3-crtc.0 (ops lcdifv3_crtc_ops)
[ 2.645872] imx-drm display-subsystem: bound imx-lcdifv3-crtc.0 (ops lcdifv3_crtc_ops)
[ 8.284476] rtc-pcf2131-i2c 2-0053: oscillator stop detected, date/time is not reliable
[ 8.318171] rtc-pcf2131-i2c 2-0053: registered as rtc1

0 项奖励
回复

1,813 次查看
JorgeCas
NXP TechSupport
NXP TechSupport

Hello,

Please confirm if you disconnected the power cable from the board.

Best regards.

0 项奖励
回复