Tool/software:
Hello,
I am currently trying to understand how the Stack Pointer Register operates.
I have reviewed the Datasheet and Technical Reference Manual but could not find a detailed explanation of how the Stack Memory works. Is there a specific document that provides detailed information about Stack Memory operation?
Here is what I have deduced so far:
- The basic unit of stack memory is 8 bytes.
- The memory allocated for storing the return address is 8 bytes.
- However, actual data (payload) is stored in 4-byte units.
- If the size of a parameter or an argument is less than or equal to 4 bytes when divided by 8 bytes, it is stored in the remaining space of the memory allocated for the return address.
The above points are based on my assumptions, and I am having difficulty understanding the following:
- Why the value 0x00000001 is stored at address 0x08000FA8
- Why the value 0x00000005 is stored at address 0x08000FF8
I would greatly appreciate it if you could provide clarification on these points. Thank you!