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.

bios 6 clock module + timer

Other Parts Discussed in Thread: SYSBIOS

Hi everybody!

I use

ccsv_4.2.0.10018
bios_6.30.02.42
xdc_3.20.03.63
edma3_lld_2.10.03.04
ipc_1.21.02.23
ndk_2.20.00.19
psp_02.10.01

I have a custom board with OMAPL137 and 50MHz quartz.

The clock module configures timer period with 24000 value (as EVMOMAPL137 platform has 24 MHz quartz)

What should I do to make the clock module to configure  timer properly?

Thanks!

  • you can do config work by yourself. I mean using clock_source_USER.

    you initiate timer perpheral in main(), direct INT to int_no set in BIOS's HWI object.

    in timer_fxn call Clock_tick() manually.

    -- that 's all the thing you need do. I have tested today, It works well.

     

    In fact, I suspect if your BIOS.Clock in custom board can work.

    I worked at board based 6748. but the "normal method" -- config in Bios .cfg doesn't work.  

  • Sounds good.

    One question:

    How should I tell the Clock module the timer instance handle it use?

    For example if I want to use Clock_getTimerHandle function.

  • I think there should be a way to configure or create a platform with the default timer frequency of 50 MHz

    Look below, to my mind it means that there are platforms with changable timer frequency, so you can create such a platform somehow...

    var params = new Timer.Params;
      ...
    params.extFreq = Types.FreqHz {
        lo: 0,
        hi: 0
    };

    DETAILS
    This parameter is meaningfull only on platforms where the timer clock can be changed. If value is left at zero, then default hookup of timer clock is assumed.

  • Is there any ideas from TI?

    Thanks

  • The default frequency of timer is defined in

    bios_6_30_02_42\packages\ti\sysbios\timers\timer64\timer.xs

    I wonder why it`s defined for the processor (i.e. TMS320DA830), not for the platform?

    To my mind it should be defined for the platform, because quartz frequency is platform specific.

    Does anybody knows how to override it in the platform.xs for my platform?

     

    in timer.xs:

        var deviceTable = {
            "ti.catalog.c6000": {

    .......................................................

                "TMS320DA830": {
                    timer: [
                        {
                            name: "Timer0",
                            baseAddr: 0x01c20000,
                            intNum:  [ 14, 4],
                            eventId: [ 4, 64],
                            intFreq: {
                                lo: 24000000,
                                hi: 0,
                            },
                        },
                        {
                            name: "Timer1",
                            baseAddr: 0x01c21000,
                            intNum:  [ 15, 5],
                            eventId: [ 40, 48],
                            intFreq: {
                                lo: 24000000,
                                hi: 0,
                            },
                        },
                    ]
                },

    .........................................................................

            },
        }

  • Yuriy,

    For Timer.xs, everything is defined based on device and not platform because we know what devices we support but we don't know all possible platforms that are out there based upon this device.  This file would get outdated really quick if we did based it upon platform.  Now, as far as setting this in your platform, I don't think you can do that.  What you can do though is set it in your .cfg file or have a common.cfg file that is used for that particular platform.  There is a config parameter which you can use to set this:

    var Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer");

    Timer.intFreqs[];

    If you want to set Timer0's frequency, you can do so:  Timer.intFreqs[0].lo = 25000000;     // this would be for 25Mhz.

    Judah