Compiler version: TI v22.6.0.LTS
Hello,
I've found that in my program, multiplication using int32_t and int16_t can result in an issue with the ALU, causing the calculation result to have only the least significant 16 bits valid, while the most significant 16 bits are cleared due to overflow. As a result, I have to declare both variables as int32_t to ensure the calculation result meets the expectations.
However, now I have an expression that involves multiplying a variable by a #define constant, and it seems that this constant is always declared as 16 bits in the ALU no matter what. Is there a way for me to set this constant to 32 bits or another method such as modify project property to ensure the calculation result is correct?
In other ARM-based MCUs, I have never encountered this issue of adhering to smaller declarations and causing overflow-clearing problems. I have also developed using the same TI compiler (@TM4C123x) without any issues. Therefore, should I reasonably conclude that this is an ALU issue specific to the C2000 platform?
Thanks,