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.

The platform "ti.platforms.tms320x28:TMS320C28346" does not set the cpu frequency right.

Other Parts Discussed in Thread: TMS320C28346

I had a post

http://e2e.ti.com/support/embedded/f/355/p/124046/443930.aspx#443930

As one can see I got some suggestions and I followed all of them that is

1. Corrected the typo in TMS320C28346.cmd as suggested by Judah.

The Memory segment "CSM_PWL_PROG" should be renamed "CSM_PWL".

2. Corrected another typo in platform.xs as suggested by Scott

In Platform.xs replace this line:

    "TMS320C28346"  : "Type_2934x",

With this:

    "TMS320C28346"  : "Type_2834x",

But the clock module is producing wrong timings. I found out that PLL settings were not right for my board (PLLCRDIV = 10 I wanted it to be 29 ).

I changed following line in platform.xs

Boot.pllcrDIV = 10;

to

 

Boot.pllcrDIV = 29;

and added following line.

Boot.pllOSCCLK = 20;

 

I have not invented these lines. They are there in platform.xs in another platform that worked in past for me that is 

ti.platforms.control28346

So now my lines from line number 120 to 124 in platform.xs are as follows

    Boot.disableWatchdog = true;
    Boot.configurePll = true;
    Boot.pllOSCCLK = 20;
    Boot.pllcrDIV = 29;
    Boot.pllstsDIVSEL = 2;

 It works for me but I have modified the platform.xs file too much so I need a nod from TI or some other wounded soldier. Meanwhile I will continue to use the older platform.

sunil

  • Sunil,

    The tms320x28 “generic” platform has defaults that are shared across the different C28x devices that are supported.  For the generic case, the OSCCLK is assumed to be 10MHz, and the multiplication factor is 10.

    To run at a different rate than the default, on a specific board, it is intended that the developer change the Boot module configuration parameters.  For the control28346 board, with an OSCCLK of 20MHz, you made the proper changes to run at 300MHz:

        Boot.pllOSCCLK = 20;
        Boot.pllcrDIV = 29;

    To summarize: the default CPU rates when using the generic “tms320x28” platform may be different than those on older board-specific platforms.  And yes, you made the proper modifications to use the tms320x28 platform on the control28346 board, running the CPU at 300MHz.

    Sorry that this wasn’t clear, and that you became a wounded soldier along the way.

    Regards,
    Scott

  • Scott,

    Thank you for the help. Few things are not clear.

    What is the intended frequency setting with PLLCRDIV set at 10 ? The setting will result into 10*11/2  that is 55 Mhz...That is an odd choice.

    Do you mean to say that one should modify platform.xs file ? Is there no easier means to set the PLL parameters ?

    The platform is specifying the processor in its name (ti.platforms.tms320x28:TMS320C28346 ) so it should automatically choose 300 or atleast 200 Mhz.

    is the platform tried by the coder or tester in TI on any of TI's eval board ? May be no otherwise he or she would catch all these within few minutes of testing.

    It would help the community if blinking LED is incorporated in one of the BIOS example.

    sunil

  • Sunil,

    Yes, using the default settings for the C28346 with the tms320x28 platform, the CPU frequency is 55MHz.  This wasn’t chosen intentionally for this device, but it is the result of picking default Boot module configuration values for this generic platform that should avoid over-clocking across the supported devices for this platform, in the most common device configurations.

    And yes, the device name is included in the platform name, so we can change configuration settings based upon the selected device.  (We actually do this on other platforms, but not on this generic platform.)  For a general case, we don’t know if the customer may be using a different OSCCLK input for their board.  Most C28x configurations I know of use a 10MHz OSCCLK.  If we assume that, and configure for 300MHz, then if the customer actually has a 20MHz input, we’ve got a bad over-clocking situation.

    The user should change the Boot module parameters via the application configuration, either via the graphical tool, or via adding to the configuration script directly.  *Not* via modifications to the Platform.xs file. 

    For the graphical method, the steps are: 1) double click on the .cfg configuration file (or open with XGCONF), 2) Click on the “Device Support” button, 3) Click on the Startup Options “Boot” module, 4) on that page click the check box “Add C28x Boot management to my configuration", and then 5) modify the PLL configuration settings, save the file, and build the program.  The “Boot” module settings are connected to the rest of the SYS/BIOS configuration, so the computed CPU frequency based on the Boot config settings will be propagated to the rest of the SYS/BIOS configuration.

    For the scripting method, you can add something like the following directly into the .cfg file with a text editor:

    var Boot = xdc.useModule('ti.catalog.c2800.init.Boot');
    Boot.pllOSCCLK = 20;
    Boot.pllcrDIV = 29;
     
    And finally, yes, we do a lot of testing on different devices and boards, including this one.  The two bugs related to typos were due to some changes and merges late in the release process, after some of that earlier testing.  The PLL type typo was *only* for the C28346 device.  The memory name typo was only for the C28345 and C28346 devices.

    Regards,
    Scott