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 TI Experts,
Customer is working on TDA4VH SDK9.1.
We want to use MCU_TIMER4 to create a 64-Bit timer on R5F MCU-Domain. As cascaded timers did not work (same problem as described in https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1030321/tda4vm-error-count-when-timer7-cascaded-to-timer6 and https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1257454/tda4vm-problem-when-trying-to-put-two-timers-in-cascade-in-main-and-mcu-domains/4847783?tisearch=e2e-sitesearch&keymatch=cascade%20timer#4847783), we detect the overflows by ourselves to generate that 64 bit timer. We want to configure it to run with 250 MHz. As SYSCLK should be 1000MHz we use the following clock source, taken from j784s4_public_combined_TRM_registers.xlsx to set it to 250 MHz:
We select the clock source in code like this:
When the timer is enabled counter ticks increment 250000000 in 1 second (we used Osal_delay(1000) to sleep 1 second between reading the ticks). Everything seems to work as expected. See following screenshot:
However k3conf tool says, that MCU_TIMER4 is running with 62.5 MHz. Also the variable name indicates, that SYSCLK is divided by 16. There seem to be inconsistencies between implemented code and documentation of the registers described in j784s4_public_combined_TRM_registers.xlsx.
Our questions:
Is our configuration of the timer correct if the counter should be incremented at a rate of 250 MHz? (a practical test seems to suggest that it is correct)
If our configuration is correct, then why is the output of k3conf seemingly wrong?
Kind Regards,
Kevin
Hi Kevin,
Can you please double check the following:
1) Read the CTRL_MMR_MCU_TIMER4_CLKSEL and see if it is actually selecting sysclk/4
2) Check the clock being set by directly calling Sciclient_pmGetModuleClkFreq API instead of using k3conf, to rule out any issues with k3conf dump
Also, looping in our H/W experts to check if there is a way we can probe this clock.
Regards,
Parth
Hi Parth,
1) Following function call returns 1 (should be sysclk/4):
2) Following function call returns 62500000 for freq:
Regards,
Christian
Hi Kevin, Christan,
Can you please try with Clock ID 6 as parent. With this I can see 250MHz getting configured for MCU TIMER 4
Regards,
Parth
Hi Parth,
our system shows 200 MHz for clock ID 6 but this is not what we asked for. We asked why MCU_SYSCLK0 / 4 is displayed as 62.5 MHz in k3config tool and not 250 MHz. Our practical test shows, that there should actually be a frequency of 250 MHz for CTRL_MMR_MCU_TIMER4_CLKSEL 1 (should be clock ID 4).
Can you confirm that k3conf tool simply displays wrong frequencies or is there some system configuration that we are still missing?
Regards,
Christian
Hi Christian,
Parth is checking on this and will get back to you for the explanation.
Meanwhile, if you use clock ID 6, would it be okay for your application, or do you have any other concerns?
Thanks,
Kevin
Hi Christian,
Seems like this was a bug in the SDK.
I have received a patch from our dev team to fix the same.
Can you please try the following patch mcu_timer4_frequency.zip
Regards,
Parth
Hi Kevin,
you can close the ticket. We got the information we wanted.
Thanks,
Christian