Other Parts Discussed in Thread: TDA4VH
Hello
HW: own board
SW: Rtos 08_05_00_11 SDK

I found that GET_GTC_FREQUENCY is 0 in the appLogGetGlobalTimeInUsec function running on A72, why is this?
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.
Hi,
Are you sure that the GTC is running fine? Can you please check if it is enabled (0xA90000 offset should be set to 0x1)? Typically it would be enabled during boot up. But not sure if it is getting disabled?
Regards,
Brijesh
I confirm that 0xA90000 is enabled
root@j784s4-evm:~# devmem2 0x00a90000 /dev/mem opened. Memory mapped at address 0xffffb67d1000. Read at address 0x00A90000 (0xffffb67d1000): 0x00000001 root@j784s4-evm:~# devmem2 0x00a90020 /dev/mem opened. Memory mapped at address 0xffffb6b4a000. Read at address 0x00A90020 (0xffffb6b4a020): 0x00000000 root@j784s4-evm:~# devmem2 0x00a90008 /dev/mem opened. Memory mapped at address 0xffff83396000. Read at address 0x00A90008 (0xffff83396008): 0x889D4AEA
Hi,
But GTC seems to be running fine. Can you please try reading value at the offset 0x00a90008 multiple times and see if the values are changing?
Btw, i see you are using j784s4. For this device, which SDK release are you using?
Regards,
Brijesh
Also can you please share the value at 0x00a90020 and 0x00a90024 offsets?
If the value at this location is not set, can you please try setting the value manual to 200MHz and see if everything works fine?
Regards,
Brijesh
Strange, as such it should work fine, SDK 08.05 is very well tested.. Let me also check it out tomorrow..
Also can you please confirm that you are using SPL boot flow?
Regards,
Brijesh
I had quick look at SPL boot flow and SD card with vision apps running on R5F, i see that this register is setup correctly for 200MHz frequency, so dont see this issue.
Are you using different setup, boot device or boot mode or boot flow?
Regards,
Brijesh
Hi,
Can you please check if you have below lines in pdk/packages/ti/drv/sciclient/src/sciserver/sciserver_tirtos.c? I am wondering if this is creating issue in setting up correct clock in GTC registers..
/*
* Temporary hack for PDK-8511
* Configure the GTC clock to 200MHz to match SPL's expected frequency
*/
if (ret == CSL_PASS)
{
#include <tisci_devices.h>
#include <tisci_clocks.h>
Sciclient_pmSetModuleClkFreq(TISCI_DEV_GTC0, TISCI_DEV_GTC0_GTC_CLK,
200000000, 0x0, SCICLIENT_SERVICE_WAIT_FOREVER);
}
Regards,
Brijesh
ok, let me share you exact steps for including this change and building it.
Regards,
Brijesh
Please follow below steps and check the output?
1, Apply attached patch on ti-processor-sdk-rtos-j721e-evm-08_05_00_11\pdk_jacinto_08_05_00_36
/cfs-file/__key/communityserver-discussions-components-files/791/GTC_5F00_Fix.patch
2, go to ti-processor-sdk-rtos-j721e-evm-08_05_00_11\pdk_jacinto_08_05_00_36\packages\ti\build folder and use below command to rebuild sciserver.
"make ipc_echo_testb_freertos CORE=mcu1_0 BOARD=j721e_evm -sj "
3, copy generated binary "ti-processor-sdk-rtos-j721e-evm-08_05_00_11\pdk_jacinto_08_05_00_36\packages\ti\binary\ipc_echo_testb_freertos\bin\j721e_evm\ipc_echo_testb_freertos_mcu1_0_release_strip.xer5f" to PSDKLA\board-support\prebuilt-images folder.
4, goto PSDKLA top level folder and run "make u-boot" to rebuild uboot
5, copy generated uboot binaries to BOOT partition of the SD card.
cp board-support/u-boot_build/a72/u-boot.img /media/$(USER)/BOOT/
cp board-support/u-boot_build/a72/tispl.bin /media/$(USER)/BOOT/
cp board-support/u-boot_build/r5/tiboot3.bin /media/$(USER)/BOOT/
Regards,
Brijesh
ok, the method will remain same. The difference is only that it uses combined bootflow, so we dont need to copy sysfw.itb file and tiboot3.bin will be available somewhere in k3-resource-partition tool folder.
Rgds,
Brijesh