CCS C Compiler User Guide (SLAU132U) Sec 2.14 describes how to specify an "--entry_hook" function which could use __get_SP_register [Table 6-5] to compare against the linker-created symbol "_stack", which points at the bottom of the stack. You'd have…
Part Number: MSP430F2013
Due to limited amount of flash on MSP430 F2013 my bootloader (located in upper 1K of flash) handles some of low level I2C functionality and passes the execution to the application (located in lower 1K of flash). The execution is…
Hi,
it is possible to retrieve the value of the PC from the stack pointer using the intrinsic function __get_SP_register(). The 20bit PC is split in 16 bit and 4 bit. The upper most 4 bits are encoded into the SR bits of the SP. Please see chapter 6.2…
Part Number: CCSTUDIO-MSP
Tool/software: TI C/C++ Compiler
Hi,
I needed a way to see how much of my C++ stack was being consumed in my MSP application - the traditional way is to "poison" the stack with a known pattern, and then to see how much of it…
Other Parts Discussed in Thread: MSP430G2955 Tested and working on a G2553 Launchpad with IAR. No real limit on the number of virtual cores/threads, though you will run out of ram and recommend msp430G2955 that comes with 4K of RAM
To add: __system_delay…
I'm trying to checkpoint (store RAM, GPR and peripherals into FRAM before a power failure) inside a Comparator_D interruption, but when the system is restored, the PC is placed again inside the Interruption. Is possible to modify the PC value in order…
Other Parts Discussed in Thread: MSP430F2252 I have two question: 1. In spec, the voltage level of BOR <= 1.8V, but if CPU work in MCLK=12Mhz, it need VCC >= 2.7V, so when VCC is in 1.8V - 2.7V, no any function of BOR? In other words, CPU will get out of…
Before serving an ISR, the PC + SR are automatically pushed on the stack. If you use a compiler like IAR, it also automatically pushes R4 to R11.
The way the PC is saved on the stack depends wether the MSP430 has 16 or 20 bits register:
In the case…