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.

AM5728: Clock, Timer and Power Idle Questions

Part Number: AM5728
Other Parts Discussed in Thread: SYSBIOS,

Tool/software:

SDK Linux -06.03.00.106

SDK RTOS -06.03.00.106

Running Linux on host and BIOS-RTOS on DSP1 and DSP2.  I have built and run the ex02_messageq example successfully

I've been trying to understand the following section of the Dsp2.cfg file of the ex02_messageq example. I have read what documentation I can find on the modules in the examples but its more reference and doesnt give much context of why?

  1. Is this specifying that the clock ticks are provide by user code?
  2. Why is  timer being created here?
  3. Is there not a timer built into the RTOS?
  4. Without this timer would a Task_sleep or a wait on a message queue with timeout work?

var Clock = xdc.useModule('ti.sysbios.knl.Clock');
Clock.tickSource = Clock.TickSource_USER;

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

/* Skip the Timer frequency verification check. Need to remove this later */
Timer.checkFrequency = false;

/* Match this to the SYS_CLK frequency sourcing the dmTimers.
* Not needed once the SYS/BIOS family settings is updated. */
Timer.intFreq.hi = 0;
Timer.intFreq.lo = 19200000;

var timerParams = new Timer.Params();
timerParams.period = Clock.tickPeriod;
timerParams.periodType = Timer.PeriodType_MICROSECS;
/* Switch off Software Reset to make the below settings effective */
timerParams.tiocpCfg.softreset = 0x0;
/* Smart-idle wake-up-capable mode */
timerParams.tiocpCfg.idlemode = 0x3;
/* Wake-up generation for Overflow */
timerParams.twer.ovf_wup_ena = 0x1;

/* Create Timer module */
Timer.create(Clock.timerId, Clock.doTick, timerParams);

The second set of questions are regarding the idle loop

  1. Why is the purpose of including the power management module in this example?
  2. Where is the function IpcPower_idle defined?

/*
* ======== Power Management Configuration ========
*/
/* Bring in modules used in Power Management */
xdc.loadPackage('ti.pm');
var Power = xdc.useModule('ti.sysbios.family.c66.vayu.Power');
Power.loadSegment = "PM_DATA";

/*
* Workaround for silicon bug
*
* IpcPower_callIdle must be placed in L2SRAM and not external memory
* to avoid CPU hang when going into idle. We do so by adding an entry
* into the resource table so that the loader can load to internal L2.
*/
Program.sectMap[".text:IpcPower_callIdle"] = "L2SRAM";

/*
* Add function to support Power Management in the Idle loop
* Must be added after all other Idle functions
*/
Idle.addFunc('&IpcPower_idle');

  • Hi,

    The cfg file at <SDK>/IPC/examples/AM572X_bios_elf/ex02_messageq/dsp1 seems to be different than what you shared. Can you please share the exact path of the cgf file you are referring to?

    I've been trying to understand the following section of the Dsp2.cfg file of the ex02_messageq example. I have read what documentation I can find on the modules in the examples but its more reference and doesnt give much context of why?

    Also, can you please mention the documentations that you have referred.

    Regards,
    Parth

  • ti-processor-sdk-rtos-am57xx-evm-06.03.00.106/ipc_3_50_04_08/examples/DRA7XX_linux_elf/ex02_messageq/dsp2

    I've been referring to the TI-RTOS Kernel (SYS/BIOS) users manual Section 5.

  • According to this readme.txt I should be using the  AM572X_linux_elf directory since we are running linux on our host (AM5728) and TI-RTOS on DSP but there is no AM572X_linux_elf directory. And as I mentioned the example runs fine. Just have questions about some of the lines in the Dsp2.cfg file.

    This directory has examples for the different platforms. The directory name has the following format <platform_name>_<hostos>_<image_format>.
    (e.g DRA7XX_bios_elf : Indicates examples intended for DRA7XX platform with host core running BIOS. (executable binaries will be created in elf format)
    K2G_linux_elf: Indicates examples indended for K2G platform with primary host running linux (executable binaries will be created in elf format)

  • Hi, 

    Need to check this internally. Will get back to you by tomorrow.

    Regards,
    Parth

  • You didn't forget about me did you Slight smile