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.

TMS320C5517: XSP and XSSP stack pointer on TMS320C5517

Guru 16800 points
Part Number: TMS320C5517

Hello,

I have some questions for the stack pointer on TMS320C5517.

1.What is the difference between XSP and XSSP?
  I cannot understand the meaning of "system stack".

2.What is the PRIMARY STACK and SECONDARY STACK?
  Also, in the following document, PRIMARY STACK and SECONDARY STACK is described instead of XSP and XSSP.
  www.ti.com/.../spru281g.pdf

3.Is the use of XSP and XSSP distinguished when the followings are executed?
  - When the function is called from Main function.
  - Any interrupt is occurred when executing main function.
  - When the function is called from any interrupt handler.

4.Is the allocated stack memory region difference for XSP and XSSP?

Best Regards,
Nomo

  • Hi Nomo,

    I've notified the C5000 team. They will post their feedback directly here.

    Best Regards,
    Yordan
  • There is really only one stack, but it is split into two pieces, the "stack" and the "system stack," which are placed at different locations.  The XSP points to the top of the lowest 16 bits of values pushed on the stack, and the XSSP points to the upper bits of values pushed onto the stack.  This is a bit of a simplification; for full details, see the CPU guide.  The C55x has this stack configuration in order to provide code compatibility with the C54x.  In C54x mode, you can ignore the XSSP and consider only the regular stack.  In C55x mode, we need to push wider values onto the stack, so it adds the "system stack," pointed to by XSSP.  There are several stack operation modes, the most important of which are lockstep (for C54x) and C55x fast return mode.  Again, see the CPU guide for details.  The important thing to remember is that there is really only one stack, but the bookkeeping for that stack is more complicated that the usual processor.

  • Hello Archaeologist-san,

    Thank you for your kind support.
    However, I'm little bit confused.
    I want to know how should I decide the size of Sysstack.

    1.What the point to divide the stack and sysstack?
    Can I regard these stack as like page?

    2.When the stack is full, is Sysstack used automatically?
    In other words, does the hardware control the used region of stack?

    Best Regards,
    Nomo