Part Number: MSP430FR5969
Tool/software: Code Composer Studio
Hi,
My customer reported unexpected compile results for MSP430FR5969.
TI compiler version: 20.2.2.LTS and 18.12.6.LTS are tested and results were the same.
Optimization level: “4 - Whole Program Optimizetions”
Below C sources are compiled to each asm code.
a)
SystemParameters.AlarmToneVolume.Data = SystemParamDefault.AlarmToneVolume.Data;
=>
1840 4292 AE9E 446A MOVX.W &0x0ae9e,&0x0446a
b)
SystemParameters.BatteryVoltageLevel.Kind = SystemParamDefault.BatteryVoltageLevel.Kind;
=>
40B2 3331 4444 MOV.W #0x3331,&0x4444
c)
SystemParameters.TimeOutSetting.Data.DoseDispTime = SystemParamDefault.TimeOutSetting.Data.DoseDispTime;
=>
1840 42D2 AE50 441C MOVX.B &0x0ae50,&0x0441c
Customer expects the b) should be complied to;
MOV.W &0x0ae78,&0x4444
where “&0x0ae78” is an address of SystemParamDefault.BatteryVoltageLevel.Kind
But immediate value “#0x3331” is used instead.
If the optimization level is changed to “3 - Interprocedure Optimizations”, the issue is gone.
But in this case, performance is not enough to meet their system requirements.
Thanks and regards,
Koichiro Tashiro