Greetings Community,
I am currently developing a "Remote programming protocol" via wireless code update for msp430f1611 platform, facing some issues that need to be solved.
1. In order to use block write to flash, I need some code to run from RAM. As indicated here: http://e2e.ti.com/support/microcontrollers/msp43016-bit_ultra-low_power_mcus/f/166/t/42302.aspx by mr William Goh's response (code .zip), all I need to do is :
a) modify the linker command file as follows:
MEMORY
{
...
RAM_MEM : origin = 0x1900, length = SIZE_OF_CODE
...
}
SECTIONS
{
...
.RAMCODE : {} > RAM_MEM
...
}
b) include a PRAGMA directive in the source file, just before the definition of function to be run from RAM:
#pragma CODE_SECTION(ram_func,".RAMCODE")
void ram_func(...) {
...
}
This way I don't need to copy the ram_func at runtime to RAM, right?
2. What is the correct/safe Flash timing generator frequency for msp430f1611? I've looked through documentation, but haven't found anything more specific
than the constraint : 257KHz <= FTG_freq <= 476 KHz.
3. After I have copied the whole code image into flash (all main prog mem sections: .text, .const, .cinit etc, as well as the interrupt vector), what kind of reset
should I generate (PUC, POR?) and how can I do this in-system-wise ?
Thank you in advance.