Author Topic: TEB0911 - real time clock (RTC) question/problem  (Read 1021 times)

mt-user-2019

  • Active Member
  • *
  • Posts: 16
TEB0911 - real time clock (RTC) question/problem
« on: April 05, 2022, 07:52:28 AM »
Hello,

Thank you everyone for your support.

For the problem that I am describing here we are using the prebuilt linux distribution from trenz ( but I have the same problem with our own distribution)

On a TEB0911 I do not succeed to make the HWCLOCK working
I set the date with the date command and I use HWCLOCK -w to set the hardware from system time at this point I can see that the time does not 'move'
I tried HWCLOCK -d /dev/rtc0 with the same resutl -> the time is not increasing

If some one could give me a hand I will be glad.

Regards
M

mt-user-2019

  • Active Member
  • *
  • Posts: 16
Re: TEB0911 - real time clock (RTC) question/problem
« Reply #1 on: April 08, 2022, 11:31:56 AM »
Hello,

Follow up.

I am still a complet begginer...

On the schematic I can see the battery holder connected to the BANK 503 PSCONFIG. So the RTC seems to be 'build in' the zynq ultra scale.

in this document https://docs.xilinx.com/v/u/en-US/xapp1323-zynq-usp-tamper-resistant-designs
they talk about "(The VCC_PSBATT pin maximum input current ICC_PSBATT is between 3650 and 150 nA depending on the battery voltage and whether the real-time clock (RTC) is enabled or disabled."

So i guess I should find a place to enable it.

https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18841986/Zynqmp+RTC
The Zynq® UltraScale+™ MPSoC real time clock (RTC) provides the real time even when the device is powered off. When the device is off, the RTC is switched to the battery power supply. A battery-backed RAM (BBRAM) is provided for when device is operating in the battery mode. However, the RTC controller and user interface are only operational when the low-power domain supply is ON. The RTC has an alarm function that generates an alarm at a specific time and date with a 136-year range. The RTC also has periodic software calibration and logic to correct the static fractional inaccuracy of an oscillator.

So i guess I have to do "Kernel Configuration" because it is not done by default on the trenz exemple?


I post all of that in case some one need that info later OR if someone want to comment :)

BR
M

JH

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1969
Re: TEB0911 - real time clock (RTC) question/problem
« Reply #2 on: April 11, 2022, 07:30:32 AM »
Hello,

Quote
So i guess I have to do "Kernel Configuration" because it is not done by default on the trenz exemple?
Yes that was my first guess as well. We have tested this once on another U+ Zynq modul (TE0803), there it works without further kernel configuration. The problem you describe we could reproduce on a TEB0911 with the same Vivado/Petalinux version, like we have used on the TE0803 module. We will check this and I will get back to you. But I am now on vacation, so it will take a while.

br
John

mt-user-2019

  • Active Member
  • *
  • Posts: 16
Re: TEB0911 - real time clock (RTC) question/problem
« Reply #3 on: April 11, 2022, 09:13:32 AM »
Hello John,

As usual you are everywhere on this forum replying us about our doubt and questions... thanks again JH.

Well enjoy you vacation.

I will keep an eye on trenz forum until trenz's team post something about it.

BR
M

mt-user-2019

  • Active Member
  • *
  • Posts: 16
Re: TEB0911 - real time clock (RTC) question/problem
« Reply #4 on: April 21, 2022, 01:37:39 PM »
But I am now on vacation, so it will take a while.

Hello John,

I know you and your team are very busy people so I 'pop' this message 'up' as a kind reminder.
I encounter also an other 'problem' with USB port that are not always working. I will open a new forum topic for that

Best regards
M

JH

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1969
Re: TEB0911 - real time clock (RTC) question/problem
« Reply #5 on: April 25, 2022, 07:06:31 AM »
Hello,
sorry for the late notice. I'm today only back from Easter vacation.

Regarding the RTC we are still checking. We have already been able to reproduce something, but are still looking for the cause.

Regarding USB.
Did you use USB2 or USB3 Stick?
Do you have the same behaviour with our our reference design?
Did you changed one time USB Stick? --> I have seen some problems but still recognized on the PC on most USB ports (not all).
Or it's this one: https://support.xilinx.com/s/article/72992?language=en_US
We are working on 21.2 update at the moment.
br
John

mt-user-2019

  • Active Member
  • *
  • Posts: 16
Re: TEB0911 - real time clock (RTC) question/problem
« Reply #6 on: April 27, 2022, 09:56:02 AM »
Hello,

Welcome JH :)

RTC >We wait your input

USB> We are using a USB-keyboard, USB-mouse... that works less than 50% of the time. and we have a NVME,  a displayport screen.
The NVME works 100% of the time.
The screen 99% of the time.
(we are using vivado 2019.2)

Once I have updated Vivaodo 2019.2 with AR72AA2. I rebuild a *.xsa file to create a new platform and then use the new FSBL + PMUFW for building linux? I do not clearly understand where this 'patch' will be apply. Linux kenel, rootfs both? As you see i never stop to be a beginer.

(Do you want me to open a new topic on the forum to let others be able to follow, in case they need?)

Best Regards,
M

« Last Edit: April 27, 2022, 09:59:09 AM by mt-user-2019 »

JH

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1969
Re: TEB0911 - real time clock (RTC) question/problem
« Reply #7 on: April 27, 2022, 10:15:50 AM »
Hi,
regarding:
Quote
RTC >We wait your input
Short update (I've changed the text :-)):
we find the problem. It's an HW bug. Connection is wrong (I was too stupid at the beginning to compare the two schematics :-( )
We check if we can find a fix for this problem.  I'll get back to you as soon as we have something.

regarding:
Quote
USB> We are using a USB-keyboard, USB-mouse...
Can you try out our prebuilt binaries from the reference design?
https://wiki.trenz-electronic.de/display/PD/TEB0911+Test+Board
https://wiki.trenz-electronic.de/display/PD/TEB0911+Test+Board#TEB0911TestBoard-Launch

Do you have the same problem there?
br
John
« Last Edit: April 27, 2022, 10:39:06 AM by JH »

mt-user-2019

  • Active Member
  • *
  • Posts: 16
Re: TEB0911 - real time clock (RTC) question/problem
« Reply #8 on: April 27, 2022, 11:52:22 AM »
Hello,

RTC
HW... Finger cross then

USB
Quote
Can you try out our prebuilt binaries from the reference design?
Yes of course with TEB0911-test_board-vivado_2019.2-build_12_20200603131549
1. We have this reference TEB0911-04-9BEX1MA and I used _create_linux_setup.sh with TEB0911-04-9BEX1FA
I hope it is ok.

2. TE::hw_build_design -export_prebuilt  and then TE::sw_run_vitis -all

3. SD card with  image.ub, Boot.bin, init.sh

4. I have the same equipment attached on the TEB0911 (nvme, displayport, FMC board) all same except that on usb port I have plugged only a mousse.

5 . turn on  verify  turn off
    I can see the same problem, sometime everythings is ok sometimes it is not
    I have attached 2 logs where one I have USB port working and one not working

Difference between 2 files ( as far as I can see):
Working :
Starting udev
[    5.607174] udevd[1883]: starting version 3.2.5
[    5.612036] random: udevd: uninitialized urandom read (16 bytes read)
[    5.613168] usb 2-1: new SuperSpeed Gen 1 USB device number 2 using xhci-hcd
[    5.618534] random: udevd: uninitialized urandom read (16 bytes read)
[    5.632005] random: udevd: uninitialized urandom read (16 bytes read)
[    5.642007] usb 2-1: New USB device found, idVendor=04b4, idProduct=6508, bcdDevice=50.00
[    5.642618] udevd[1884]: starting eudev-3.2.5
[    5.650188] usb 2-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    5.726284] hub 2-1:1.0: USB hub found
[    5.731396] hub 2-1:1.0: 4 ports detected
[    5.917819] usb 1-1.3: new low-speed USB device number 3 using xhci-hcd
[    6.029581] usb 1-1.3: New USB device found, idVendor=0000, idProduct=0538, bcdDevice= 1.00
[    6.037980] usb 1-1.3: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[    6.045334] usb 1-1.3: Product:  USB OPTICAL MOUSE
[    6.112258] FAT-fs (nvme0n1p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.

NOT working
Starting udev
[    5.674762] udevd[1885]: starting version 3.2.5
[    5.679636] random: udevd: uninitialized urandom read (16 bytes read)
[    5.686119] random: udevd: uninitialized urandom read (16 bytes read)
[    5.692609] random: udevd: uninitialized urandom read (16 bytes read)
[    5.703237] udevd[1886]: starting eudev-3.2.5
[    6.152838] FAT-fs (nvme0n1p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
[    6.309791] EXT4-fs (nvme0n1p2): recovery complete
[    6.314594] EXT4-fs (nvme0n1p2): mounted filesystem with ordered data mode. Opts: (null)
[    6.349622] FAT-fs (mmcblk1p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.


   


« Last Edit: April 27, 2022, 12:00:05 PM by mt-user-2019 »

JH

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1969
Re: TEB0911 - real time clock (RTC) question/problem
« Reply #9 on: April 27, 2022, 12:35:07 PM »
Hi,

use prebuilt binaries without "2. TE::hw_build_design -export_prebuilt  and then TE::sw_run_vitis -all"
This will overwrite prebuilt binaries.
Download reference design again and use the pre generated files from the prebuilt folder " TEB0911-04-9BEX1FA" is OK it's only other emmc.
It probably won't make a difference, but I like to play it safe.

Have you tried another USB stick?
What did you see when you type "lsusb" in both cases?
When it's not available and you unplug and plug your usb device again. will it be recognised or not?

Can you send me the serial number (the number on the small sticker with QR code) of your TEB0911 to "support@trenz-electronic.de".
USB should work , I would like to have a look at the test reports to see if I notice anything.

br
John

mt-user-2019

  • Active Member
  • *
  • Posts: 16
Re: TEB0911 - real time clock (RTC) question/problem
« Reply #10 on: April 27, 2022, 02:45:26 PM »
Hello,

Quote
use prebuilt binaries without "2. TE::hw_build_design -export_prebuilt  and then TE::sw_run_vitis -all"
This will overwrite prebuilt binaries.
Download reference design again and use the pre generated files from the prebuilt folder " TEB0911-04-9BEX1FA" is OK it's only other emmc.
It probably won't make a difference, but I like to play it safe.
Done!

1. I have boot the TEB0911 without something connected to the USB
2. login
3. lsusb
4. plug
5.lsusb

I have the same behavior (attached logs)


Quote
Have you tried another USB stick?
I have different usb devices and none of them works when it does not.
If It works everything works.

Quote
What did you see when you type "lsusb" in both cases?

lsusb when it works

Bus 001 Device 002: ID 04b4:650a Cypress Semiconductor Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 002: ID 04b4:6508 Cypress Semiconductor Corp.
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub


lsusb when it does not works
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 002: ID 04b4:6508 Cypress Semiconductor Corp.
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub

Quote
When it's not available and you unplug and plug your usb device again. will it be recognised or not?
No, I tried. When it does not work, unplud/plug will not change something.

Quote
Can you send me the serial number (the number on the small sticker with QR code) of your TEB0911 to "support@trenz-electronic.de".
USB should work , I would like to have a look at the test reports to see if I notice anything.
Done!

Best regards
M