TMDS64EVM: Hello world example hello_world_am64x-evm_r5fss0-0_nortos_ti-arm-clang hangs at DebugP_assertNoLog() during system_init() in SOC_moduleSetClockFrequency()

Part Number: TMDS64EVM

Tool/software:

On a new TMDS64EVM I tried a couple different examples unsucessfully so loaded one of the "Hello World" examples, expecting it to work for sure.  

From main() the call path is:

System_init(void)
  PowerClock_init()
    Module_clockSetFrequency()
    status = SOC_moduleSetClockFrequency(
    DebugP_assertNoLog(status == SystemP_SUCCESS)  <--- hangs here, status = -1

The example project: gpmc_psram_io_am64x-evm_r5ss0-0_nortos_ti-arm-clang also hangs at the same assert. 

After resetting the EVM this message comes up that I didn't notice before:

[ OK ] Reached target Login Prompts.
Starting Synchronize System and HW clocks...
[FAILED] Failed to start Synchronize System and HW clocks.
See 'systemctl status sync-clocks.service' for details.
[ 12.883380] platform mdio-mux-1: deferred probe pending
[ 13.044334] CAN device driver interface

There aren't any other errors or warnings during boot up.

Running the command suggested in the error:

root@am64xx-evm:~# systemctl status sync-clocks.service
x sync-clocks.service - Synchronize System and HW clocks
Loaded: loaded (/etc/systemd/system/sync-clocks.service; enabled; preset: disabled)
Active: failed (Result: exit-code) since Fri 2024-10-11 14:39:54 UTC; 5min ago
Process: 417 ExecStart=/sbin/hwclock --systohc (code=exited, status=1/FAILURE)
Main PID: 417 (code=exited, status=1/FAILURE)
CPU: 39ms

Oct 11 14:39:54 am64xx-evm systemd[1]: Starting Synchronize System and HW clocks...
Oct 11 14:39:54 am64xx-evm hwclock[417]: hwclock: Cannot access the Hardware Clock via any known method.
Oct 11 14:39:54 am64xx-evm hwclock[417]: hwclock: Use the --verbose option to see the details of our search for an access method.
Oct 11 14:39:54 am64xx-evm systemd[1]: sync-clocks.service: Main process exited, code=exited, status=1/FAILURE
Oct 11 14:39:54 am64xx-evm systemd[1]: sync-clocks.service: Failed with result 'exit-code'.
Oct 11 14:39:54 am64xx-evm systemd[1]: Failed to start Synchronize System and HW clocks.

Any ideas on what is going wrong?

  • Hello Steve,

    Please tell us which version of MCU+SDK are you using?

    Which boot mode are you using?

    What is the module Id for which the  SOC_moduleSetClockFrequency() API stucks at DebugP_assert()?

    Regards,

    Tushar

  • Hi Tushar, thanks for the response on this. The CCS tools and this EVM are new for me.

    CCS:
      Version: 20.2.0.12__1.8.0
      Default VS Code API: 1.96.0

    The CCS Project shows it is using mcu_plus_sdk_am64x_10_01_00_32, but I noticed that mcu_plus_sdk_am64x_11_01_00_17 is also in the C:\TI directory and I didn't realize both are installed (and have to look up how to change it if that is the problem)

    It is booting from MMC/SD

    Messages on serial console at power-up / reset:

    U-Boot SPL 2024.04-ti-g29d0c23d67ee (Nov 29 2024 - 11:41:54 +0000)
    SYSFW ABI: 4.0 (firmware rev 0x000a '10.1.8--v10.01.08 (Fiery Fox)')
    SPL initial stack usage: 13392 bytes
    Trying to boot from MMC2
    Authentication passed
    Authentication passed
    Loading Environment from nowhere... OK
    Authentication passed
    Authentication passed
    Starting ATF on ARM64 core...
    
    NOTICE:  BL31: v2.11.0(release):v2.11.0-906-g58b25570c9-dirty
    NOTICE:  BL31: Built : 04:20:32, Nov  1 2024
    I/TC: 
    I/TC: OP-TEE version: 4.4.0-dev (gcc version 13.3.0 (GCC)) #1 Fri Oct 18 17:45:27 UTC 2024 aarch64
    I/TC: WARNING: This OP-TEE configuration might be insecure!
    I/TC: WARNING: Please check https://optee.readthedocs.io/en/latest/architecture/porting_guidelines.html
    I/TC: Primary CPU initializing
    I/TC: GIC redistributor base address not provided
    I/TC: Assuming default GIC group status and modifier
    I/TC: SYSFW ABI: 4.0 (firmware rev 0x000a '10.1.8--v10.01.08 (Fiery Fox)')
    I/TC: Activated SA2UL device
    I/TC: Enabled firewalls for SA2UL TRNG device
    I/TC: SA2UL TRNG initialized
    I/TC: SA2UL Drivers initialized
    I/TC: HUK Initialized
    I/TC: Primary CPU switching to normal world boot
    
    U-Boot SPL 2024.04-ti-g29d0c23d67ee (Nov 29 2024 - 11:41:54 +0000)
    SYSFW ABI: 4.0 (firmware rev 0x000a '10.1.8--v10.01.08 (Fiery Fox)')
    Trying to boot from MMC2
    Authentication passed
    Authentication passed
    
    
    U-Boot 2024.04-ti-g29d0c23d67ee (Nov 29 2024 - 11:41:54 +0000)
    
    SoC:   AM64X SR2.0 HS-FS
    Model: Texas Instruments AM642 EVM
    Board: AM64-EVM rev D
    DRAM:  2 GiB
    Core:  98 devices, 31 uclasses, devicetree: separate
    NAND:  0 MiB
    MMC:   mmc@fa10000: 0, mmc@fa00000: 1
    Loading Environment from nowhere... OK
    In:    serial@2800000
    Out:   serial@2800000
    Err:   serial@2800000
    Net:   eth0: ethernet@8000000port@1, eth2: icssg1-eth-port@0
    Hit any key to stop autoboot:  2  1  0 
    switch to partitions #0, OK
    mmc1 is current device
    SD/MMC found on device 1
    574 bytes read in 41 ms (13.7 KiB/s)
    Loaded env from uEnv.txt
    Importing environment from mmc1 ...
    21029376 bytes read in 870 ms (23.1 MiB/s)
    64721 bytes read in 45 ms (1.4 MiB/s)
    Working FDT set to 88000000
    ## Flattened Device Tree blob at 88000000
       Booting using the fdt blob at 0x88000000
    Working FDT set to 88000000
       Loading Device Tree to 000000008feed000, end 000000008fffffff ... OK
    Working FDT set to 8feed000
    
    Starting kernel ...
    


    The SD card that came with the EVM is inserted

    Just in case it's needed, switch positions are:

    SW2:    8   7   6   5   4   3   2   1
            off on  off off off off on  on
                                    
    SW3:    8   7   6   5   4   3   2   1
            off off off off off off on  off

    Thanks again!

  • Sorry - I forgt to add that the moduleId is 146 on the call to SOC_moduleSetClockFrequency() that returns -1 causing it to hang because of DebugP_assertNoLog(status == SystemP_SUCCESS)

    The complete list of parameters on the call to SOC_moduleSetClockFrequency() are:

    status: -1
    gSocModulesClockFrequency[i].moduleId: 146
    gSocModulesClockFrequency[i].clkId: 0
    gSocModulesClockFrequency[i].clkRate: 48000000

  • Thanks Steve for providing the above information. From the above it looks the EVM is in SD card boot mode.

    The module Id is 146 which corresponds to UART0 instance. The above issue is expected, because UART0 instance is already been initialized by the Linux and is currently in use. You will not be able to set the clock for same UART instance twice. Please configure another UART instance(expect UART0, as already in use) to avoid this use.

  • That was it - Changed the UART in "hello world" example and another project and both work now, Thank you for the help!