Hai,
Suppose in my controller, program execution space must be 2 KB.
Free space
1) 2.1 KB
2) 3 KB
3) 8 KB
In the above which free space condition it will works fine. Or there is no difference?
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.
Hai,
Suppose in my controller, program execution space must be 2 KB.
Free space
1) 2.1 KB
2) 3 KB
3) 8 KB
In the above which free space condition it will works fine. Or there is no difference?
This depends on where the used memory segment is placed within the MCU (see Datasheet). MSP430 has two addressing modes: 16-bit and 20-bit. Everything under the 64K (location) can be addressed with 16-bit and is the fastest method.
Now, when you place the same (small) program in a larger MCU, be sure that all the used memory segments are in the region below 64K.
This can be set in the "Linker Command File" (.cmd) (CCS) and by setting options as Code-model and Data model with Small or Large.
Leo Bosch said:This depends on where the used memory segment is placed within the MCU (see Datasheet). MSP430 has two addressing modes: 16-bit and 20-bit. Everything under the 64K (location) can be addressed with 16-bit and is the fastest method.
Yes, but there are 20-bit address register instructions (mova, not movx.a, and so on) that will execute at 1 cycle, same as 16-bit. And if code is mostly based on 20-bit address register instructions, execution speed will be the same.
**Attention** This is a public forum