• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Digital Signal Processors (DSP) » C6000 Single Core DSP » C64x Single Core DSP Forum » tsk_sleep() called from a task is not working. (DSP/BIOS)
Share
C6000 Single Core DSP
  • Forums
  • Announcements
Options
  • Subscribe via RSS

tsk_sleep() called from a task is not working. (DSP/BIOS)

tsk_sleep() called from a task is not working. (DSP/BIOS)

This question has suggested answer(s)
saravanan a
Posted by saravanan a
on Sep 22 2009 02:23 AM
Prodigy70 points

hi.

my target is tci6487 symmetric little endian simulator.

i created simple DSP/BIOS program which the different tasks synchronize to each other.

here is the code.both the tasks are given task priority of 1.

 

Void main()

{

//nothing

}

void task1()

{

         for(;;)

         {

                  LOG_printf(&trace,"running in task 1");

                  tsk_sleep(5);

         }

}

 

void task2()

{

         for(;;)

         {

                  LOG_printf(&trace,"running in task 2");

                  tsk_sleep(5);

         }

}

DSP/BIOS tsk_sleep
Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • TimHarron
    Posted by TimHarron
    on Sep 22 2009 11:00 AM
    Genius16720 points

    Will you please elaborate as to what you mean by "it is not working?" Other than the function name being typed out incorrectly (TSK_sleep() instead of tsk_sleep) this code should work fine. Are the tasks even hit the first time or does your system never enter these functions? Do you have any other tasks in your system which are not blocking?

    -Tim

    ---------------------------------------------------------------------------------------------------------
    Please click the Verify Answer button on this post if it answers your question.
    --------------------------------------------------------------------------------------------------------- 

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • saravanan a
    Posted by saravanan a
    on Sep 23 2009 00:09 AM
    Prodigy70 points

    the code is working fine in all target except c64x+.

    (like running in task 1, running in task 2, delay,running in task 1, running in task 2, delay,.....)

    in target c64x+ it runs only once.

    (like running in task 1, running in task 2,then Knl_swi runs)

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • TimHarron
    Posted by TimHarron
    on Sep 23 2009 11:09 AM
    Suggested Answer
    Genius16720 points

    How long did you wait? I set up a quick project using the code you sent me and I did re-enter task1; however, this took MUCH longer than 5ms. It was actually closer to a minute to get back into it. I am assuming this is because the simulator is not running as fast as an actual piece of silicon.

    Can you confirm that it *never* makes it back into the tasks even if you wait a minute or two? You can check the "Time Remaining" of each task inside the DSP/BIOS -> Kernel Object View to see approximately how long it will take to get back into the task.

    -Tim

    ---------------------------------------------------------------------------------------------------------
    Please click the Verify Answer button on this post if it answers your question.
    --------------------------------------------------------------------------------------------------------- 

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • saravanan a
    Posted by saravanan a
    on Sep 24 2009 00:50 AM
    Prodigy70 points

    well.

    I checked in kernel object view. it shows the task remaining time.but the problem is it is not reducing  even after 20 minutes in my pc. [ xp,CCS v3.3, 1GB ram,P4 2.8GHz] .

    I don no why it took this much time. i think i should modify some timer parameters.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • TimHarron
    Posted by TimHarron
    on Sep 24 2009 13:56 PM
    Genius16720 points

    The only thing I could think of is that you had a very long system 'tick' time as opposed to the default 1ms. For example, if your system tick were 100ms then this might take 100x longer than my test did on the simulator (which admittedly took a lot longer than I would expect).

    -Tim

    ---------------------------------------------------------------------------------------------------------
    Please click the Verify Answer button on this post if it answers your question.
    --------------------------------------------------------------------------------------------------------- 

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • saravanan a
    Posted by saravanan a
    on Sep 28 2009 23:59 PM
    Prodigy70 points

    Dear Tim,

    Could you tell me  the parameters to modify ,so that the ticks takes actual / expected time period.?

    Thanks,

    Saravanan A.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • TimHarron
    Posted by TimHarron
    on Sep 29 2009 11:50 AM
    Genius16720 points
    tci6487_clk.jpg

    Check the contents of the CLK Manager (see attached). The microseconds per tick is typically about 1000 so that a tick occurs every 1ms. This programs the Timer's Period (PRD) register with a specific value that will generate an interrupt every 1ms. I've circled both of these fields in the attached photo.

    As I mentioned before the only reason I know of that causes the TSK_sleep() to take so much time is the fact that the simulator runs slower than actual hardware. This is because the simulator has to simulate everything in software which is slower than hardware. If your tick time is small you should be able to see the tasks return on the simulator even if it runs slowly.

    -Tim

    ---------------------------------------------------------------------------------------------------------
    Please click the Verify Answer button on this post if it answers your question.
    --------------------------------------------------------------------------------------------------------- 

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • saravanan a
    Posted by saravanan a
    on Sep 30 2009 02:44 AM
    Prodigy70 points

    Dear Tim,

    TCI6487 has only two timers.also the hardware interrupt is in gray color ( which i cant change).

    However I have changed the clock manager parameters as per the image you attached.

    Still,it runs as-usual. (i.e task time remaining is 1 after long time. [10 mins])

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • TimHarron
    Posted by TimHarron
    on Sep 30 2009 12:45 PM
    Genius16720 points

    It sounds like you may have hit a bug with the simulator. I will see if I can find someone more knowledgable with the simulators to help out.

    -Tim

    ---------------------------------------------------------------------------------------------------------
    Please click the Verify Answer button on this post if it answers your question.
    --------------------------------------------------------------------------------------------------------- 

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • TimHarron
    Posted by TimHarron
    on Sep 30 2009 15:34 PM
    Genius16720 points

    A side thought is that you may want to update your CCS Service Release and DSP/BIOS versions if you are not already using the latest (select Help->Update Advisor->Check for Updates). FYI I am using SR 12 with DSP/BIOS 5.33.06.

    -Tim

    ---------------------------------------------------------------------------------------------------------
    Please click the Verify Answer button on this post if it answers your question.
    --------------------------------------------------------------------------------------------------------- 

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Nizamudheen A
    Posted by Nizamudheen A
    on Oct 01 2009 00:06 AM
    Intellectual1370 points

    Hi Saravanan,

     I understood that  this problem appears in C64x+ simulator configuration only, an *not* on TCI6487 simulator. Please confirm my understanding. I also understood that you use the "C64x+ Cycle Accurate Simulator, Little Endian" simulator configuration, when you refer C64x+ simulator. Please confirm.

     The "C64x+ Cycle Accurate Simulator, Little Endian" simulator configuration's interrupt map is a fictitious interrupt map and does not relate to TCI6487 SoC's  interrupt map. Hence, you may not get the correct behavior in "C64x+ Cycle Accurate Simulator, Little Endian", as against TCI6487 simulator configuration. I recommend you to continue to use TCI6487 simulator configuration, in case of using BIOS in your application. Is there a reason you want to use  "C64x+ Cycle Accurate Simulator, Little Endian" as against the TCI6487 simulator configuration? 

     LMK if this helps.

     Regards,
    Nizam

    TSK_SLEEP Simulator interrupts timer
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Manivannan E
    Posted by Manivannan E
    on Oct 01 2009 00:30 AM
    Intellectual2010 points

    Hi Saravanan,

                   To configure the C64x+ Simulator configuration check the wiki article - http://www.tiexpressdsp.com/index.php/C64x%2B_CPU_Cycle_Accurate_Simulator & http://www.tiexpressdsp.com/index.php/C64x%2B_Cycle_Accurate_Simulator.

    Once timer memory map & interrupt are configured corresponding to TCI6487 then you shouldn't see TSK_sleep issue.

    TCI6487  Memory map - Timer0 (0x02910000 - 0x0291003F), Timer1 (0x02920000 - 0x0292003F), Timer2 (0x02930000 - 0x0293003F)

    Regards,

    Mani



    If my reply answers your question please mark the thread as answered

    Check the Wiki for more info - link 

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • saravanan a
    Posted by saravanan a
    on Oct 01 2009 00:33 AM
    Prodigy70 points

    Hi Nizam,

    My simulator is not c64+ cycle accurate simulator.

    It is TCI6487 Simulator Symmetric, Little Endian.

    Also , I tried some other simulators of family 64x+,little endian.

    Same problem only i encountered.In other familes like 64xx,62xx its working fine.

    Regards,

    Saravanan A.

    tsk_slepp TCI6487
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Nizamudheen A
    Posted by Nizamudheen A
    on Oct 01 2009 09:30 AM
    Intellectual1370 points

    Hi Saravanan,

     

    I am little confused. Please help me here [:)]

    You seems to have a application that uses TSK_sleep. This application works fine on C62XX and C64XX  simulator configuration, but not on any of the C64x+ simulator configuration, including the TCI6487 simulator configuration. I this problem statement correct? 

    Assuming so... Dont you have to change your application to use different version of BIOS to run it on TCI6487? 

     

    Regards,

    Nizam

     

     

     

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • saravanan a
    Posted by saravanan a
    on Oct 04 2009 23:55 PM
    Prodigy70 points

    Hi Nizam,

    The problem statement is right.

    i think no need to change bios version.

    currently my BIOS version is 5.31 [ ccs 3.3] .latest one is 5.33.

    bios tsk_sleep
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
12
TI E2E™ Community
  • Support Forums
  • Blogs
  • Videos
  • Groups
  • Site Support & Feedback
  • Settings
TI E2E™ Community Groups
  • TI University Program
  • Make the Switch
  • Microcontroller Projects
  • Motor Drive & Control
Other Communities
  • Deyisupport
  • Designsomething.org
  • beagleboard.org
  • TI on Element 14
  • TI on TechXchangeSM
Other Technical & Support Resources
  • WEBENCH® Design Center
  • Product Information Centers
  • Technical Documents
  • TI Design Network
  • TI Technical Articles
  • TI Training

All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
embedded processors, along with software, tools and the industry’s largest sales/support staff.

© Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy Policy | Terms of Use