• 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 » Embedded Software » BIOS » BIOS forum » What is ti_sysbios_hal_Hwi_checkStack()?
Share
BIOS
  • Forum
  • Announcements
Options
  • Subscribe via RSS

Forums

What is ti_sysbios_hal_Hwi_checkStack()?

This question is answered
j-breeze
Posted by j-breeze
on Jan 20 2012 03:07 AM
Expert1670 points

Hi,

Could you please let me know what ti_sysbios_hal_Hwi_checkStack() is?
It's in the idle loop.

Is the function required to excute in every idle loop, or  is it OK to be excuted just one time in the first idle loop?

Thank you very much in advance.

Best regards,
j-breeze 

Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • Scott Gary
    Posted by Scott Gary
    on Jan 20 2012 14:18 PM
    Verified Answer
    Verified by David Friedland
    Genius10040 points

    j-breeze,

    This is a utility function that checks the top of the system stack to see if a ‘watermark’ value has changed from its initial value.  If the value has changed, then a stack overflow has probably occurred, and a “stack overflow” error is raised. 

    So… this function does not *have* to be called regularly for application purposes, but if it isn’t called regularly, then a stack overflow won’t be automatically caught.

    This function is inserted in the Idle loop if the following Hwi configuration parameters are both set to true:

    Hwi.initStackFlag - indicating that the system stack should be initialized with the watermark

    Hwi.checkStackFlag - indicating that background checks for stack overflow should be executed in the Idle loop

    If you set “Hwi.checkStackFlag = false;” in your application configuration then the background checking won’t be done automatically, and the function won’t be called from the Idle loop.

    If you leave “Hwi.initStackFlag = true;” then the stack watermarking will still be done, so that you can still see depth of stack usage in ROV.

    Scott

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • j-breeze
    Posted by j-breeze
    on Jan 27 2012 01:37 AM
    Expert1670 points

    Scott-san,

    Thank you for your kindly support. I got it.

    Best regards,
    j-breeze

    ------------
    P.S.

    David-san,
    Could you please let me know why you verified this answer?
    I do'nt know well this procedure. I think that I can verify this answer. Right?
    Thanks in advance.

    Regards,

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Soumya Sardar
    Posted by Soumya Sardar
    on Mar 30 2012 05:56 AM
    Intellectual510 points

    Hi Scott,

    From your explanation , I understood the functionality of the function ti_sysbios_hal_Hwi_checkStack().

    Even my program is having the same problem of getting stopped at  if (*stackTop != (UInt8)0xbe)  of the function ti_sysbios_hal_Hwi_checkStack().

    Please note

    1)I am running the IPC messageQ example program for single core in generic 66xx simulator in CCS v5.

    2) After first three message were exchanged between client and server, this stack overflow happened.

    3) I did not have a c6618 cmd file for linker, so I let the linker take the default memory map file.Only increased the stack size to 0x2000 in an independent cmd file.

    Please let me know what to look for in the code to solve this problem. 

    regards

    Soumya

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Scott Gary
    Posted by Scott Gary
    on Mar 30 2012 11:24 AM
    Genius10040 points

    Soumya,

    I think it would be good to post this question on a new forum thread, with something about ‘stack overflow’ or ‘IPC messageQ example’ in the title.  That should get more attention from others who can help.

    I’ve not looked at that example, but since you are running on a simulator I’m wondering if maybe whatever is triggering the messages is too fast compared to running it on actual hardware.  Is there an interrupt that may be configured too fast in the simulator?

    Also, since the overflow is repeatable, can you use a breakpoint to check the stacks with ROV (http://rtsc.eclipse.org/docs-tip/RTSC_Object_Viewer) after each message?  You’ll probably see the stack growing, and can debug to see why.

    Scott

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
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