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.

[FAQ] AM2612-Q1: How to run AM261 SoC at 200MHz CPU Clock Frequency

Hi TI team,

How to configure AM261 SoC to run at 200MHz CPU Clock Frequency?

  • AM261 SoC can be run at 200 MHz CPU Clock frequency. This can be achieved by modifying the PLL configurations to adjust the CPU clock and SYS Clock.

    When running at 200MHz, there is a required frequency ratio mentioned in the AM261 TRM. This needs to be followed. This ratio of clock frequency between CPU and Sysclock needs to be followed

    Below, is the patch file attached for running the CPU @ 200MHz. This is applicable on AM261 MCU + SDK before clock release tool introduction.

    Modifications implemented via patch file

    • Added a new 200MHz mode in addition to existing 400MHz and 500MHz mode.
    • HSDIV0 PLL is used as source to CPU Clock.
    • Bootloader_socSetAutoClock() modified to set CPU and SysClock to 200MHz
    • HSDIVOU0 CORE PLL is now used as source to CPU Clock

    Please follow the below steps to build the SBL_OSPI example.

    1. We need to apply the path file on SDK first. The patch has been tested on mcu_plus_sdk_am261x_10_00_01_10.

    Command to apply the patch: git apply .\cpu_clock_fixed.patch

    https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/908/0121.cpu_5F00_clock_5F00_fixed.patch

    2. Build the libs

    Command to build the libs: gmake -sj32 -f .\makefile.am261x libs PROFILE=debug                                                             

    3. Build the SBL OSPI example.

    4. Build the hello world example. To measure CPU speed, the below code snippet can be called from hello world example

    void measureCpuSpeed(void)
    {
        uint32_t startCounter = CycleCounterP_getCount32();
        uint32_t startTime = ClockP_getTimeUsec();
        
        ClockP_usleep(1000);
        
        uint32_t endCounter = CycleCounterP_getCount32();
        uint32_t endTime = ClockP_getTimeUsec();
    
        uint32_t elapsedCycles = endCounter - startCounter;
        uint32_t elapsedUsec = endTime - startTime;
    
        if (elapsedUsec > 0) 
        {
            uint32_t cpuClockMHz = elapsedCycles / elapsedUsec;
            
            uint32_t cpuClockHz = (uint32_t)(((uint64_t)elapsedCycles * 1000000) / elapsedUsec);
    
            DebugP_log("CPU Freq: %u MHz (%u Hz)\r\n", cpuClockMHz, cpuClockHz);
        }
    }
    

    Flash the images and observe the output