Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8064439
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T11:21:52+00:00 2026-06-05T11:21:52+00:00

I am writing C code for an MSP430 microcontroller and I want to lock

  • 0

I am writing C code for an MSP430 microcontroller and I want to lock a global variable to a specific address in RAM.

The reason is because I have a stack at the end of the RAM address and grows downwards towards lower addresses. When the stack overflows, it starts overwriting global variables stored in RAM right next to the stack. So I want to write a watermark that is right next to the stack and check it for overflows.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T11:21:54+00:00Added an answer on June 5, 2026 at 11:21 am

    If you know where the end of the stack should be on your MSP430 device, you could do this, for example:

    int* ptr;           // will point to end of stack
    ptr = (int*)0x0600; // memory address of the end of the stack
    *ptr = 0x1234;      // value to assign to memory
    

    Here’s someone that has your same question, on the TI forums… it looks helpful: http://e2e.ti.com/support/development_tools/compiler/f/343/t/92002.aspx

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm writing code in Visual C++ and I need to use a global variable.
I am writing a code for modbus protocol, that runs on a MSP430 controller.
I find myself writing code like this when I want to repeat some execution
When writing code in JScript, as I am wont to do as I have
I'm writing code that automatically generates HTML, and I want it to encode things
I have been writing code without realizing WHY I can access constant values within
I am writing code for a UPnP device to announce itself. I have no
I'm writing code to display notifications to the user at specific times (just like
When writing code, especially when dealing with dates and times, you have to work
I am writing code to clone object but have no cue from Hobo documentation.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.