Sign in

username:

password:



Not a member?

Search basicx



Search tips

Subscribe to basicx



basicx by Keywords

Accelerometer | ADC | ADXL | Adxl20 | AVR | BasicStamp | BX-35 | BX28 | BX35 | COM3 | Compiler | Downloader | EEPROM | Electromagnet | GetADC | GP2D1 | GPS | I2C | IDE | Keypad | LCD | LCD+ | MIDI | Motors | Multitasking | Netmedia | Networking | PCB | PID | PlaySound | PWM | Relays | RTC | Servo | ShiftOut | SitePlayer | SPI | Stack | Timer | USB


Ads

Discussion Groups

See Also

DSPFPGAElectronics

Discussion Groups | BasicX | Task stacks

Discussion forum for the BasicX family of microcontroller chips.

Task stacks - Author Unknown - Feb 13 2:18:00 2001

Hello BXers,
I am looking for some insight on how tasks use the stack arrays
allocated to them. I have tried to run the taskexample on a BX24 - no
succes. I raised the stack lenghts to 50 or more - it ran OK.
Then i experimented with different lengths as descibed in the
documentation.
I am getting some outcomes i cannot explain. For instance: when i
print the stack contents i get different results in diferrent runs.
This may be because the instructions that print the stack run after
the tasks terminate, by which time the stack memory has been recycled
and put to use by some
other commands.
Then again, how can we really check the contents of the stack
precisely after a task terminates? And why should resetting the
processor result in diferent parts of the stack array beeing written
upon? (unless the operating system shifts memory addresses with every
run in order to spread eeprom wear more thinly).
Well, i am certainly missing something elementary here - so, please,
could someone explain?
Thanks in advance
George Chamilothoris




(You need to be a member of basicx -- send a blank email to basicx-subscribe@yahoogroups.com )