Other Parts Discussed in Thread: SYSBIOS
Dear TI team,
a while (1+ year) ago we reported an issue where TI-RTOS examples wouldn't start due to a DMtimer0 frequency mismatch:
ti.sysbios.timers.dmtimer.Timer: line 1162: E_freqMismatch: Frequency mismatch: Expected 25000000 Hz, actual: 402154398 Hz. You need to modify Timer.intFreq.lo to match the actual frequency.
xdc.runtime.Error.raise: terminating execution
In the related thread the answer was that CTRLMMR_MCU_TIMER0_CLKSEL was set to 1 by the ROM, choosing a 200 MHz (MCU_SYSCLK0/2) frequency for the timer input. The issues was tracked as PRSDK-5021.
With processor SDK 05.03 this was fixed by adding the following lines to board_clock.c:
/* Restoring MCU DMtimer0 FCLK to HFOSC0 (changed by ROM) */ HW_WR_REG32((CSL_MCU_CTRL_MMR0_CFG0_BASE + CSL_MCU_CTRL_MMR_CFG0_MCU_TIMER0_CLKSEL), (CSL_MCU_CTRL_MMR_CFG0_MCU_TIMER0_CLKSEL_RESETVAL));
The same code exists in processor SDK 06.00, but in 06.01 that file was moved from am65xx_idk/evm to evmKeyston3 (which makes sense, since it is not specific to IDK or EVM) and extended to use the Sciclient API to enable modules. Along that change, the line that fixed the MCU Timer0 clock input was dropped. With processor SDK 06.03, I couldn't find that line either.
For our own board we've been using the previous board_clock.c, until I realized that this causes issue with AM65x SR 2.0. I've copied the evmKeystone3/board_clock.c to our own board, and now the DMtimer0 frequency mismatch error is back. I've also verified that for example an Osal_delay() is 8x faster than it's suposed to be.
The same issue apparently also exists for J7 (probably makes sense, since AM65x and J7 share some code, from what I saw), see this thread: https://e2e.ti.com/support/tools/ccs/f/81/t/896425
Was the MCU timer0 frequency fix dropped from the SBL code by accident, or was there an intentional change, and something else changed along to make things work that I'm missing?
Regards,
Dominic