Tool/software: TI C/C++ Compiler
Hey folks,
Is it possible to put the stack in FRAM on the MSP430FR devices? There was another thread posted on this a few years ago (e2e.ti.com/support/microcontrollers/msp430/f/166/t/542727) but it was never really resolved. The last post in the thread seemed to hint they had managed to get it working, but I can't recreate it.
I've tried the obvious solution of changing the RAM setting to FRAM in the linker file (i.e. .stack : {} > FRAM), but this causes the program to get stuck in the _c_int00_noinit_noargs_noexit function. _system_pre_init is called, and then _c_int00_noinit_noargs_noexit is immediately entered again when it returns.
What seems to be happening (as far as I understand) is that the stack is still being initialised into RAM at 0x2400 despite the linker being changed. The stack pointer however is set to the top of the FRAM (0xFF80 n the FR2111), but the value at this address is just 0xFFFF, so I presume at some point the code reads the address at the stack pointer, jumps to 0xFFFF, which is just where the reset vector is, and hence jumps back to __c_init00_noinit_noargs_noexit. This then just repeats which would explain why the code is not reaching main.
(note I posted this on the reddit MSP430 forum a few days ago but it's a bit quieter there so no answer yet)
Cheers