Hello All,
I'm using CCS Version: 10.2.0.00009, C2000 compiler 20.2.2 LTS with COFF output for F2837xD controlCARD.
I want to break out of a loop when a variable >= 2560. When I (try to) calculate the literal 2560d using a macro, the literal value for compare is not as expected when compiled.
The following calculation results in 2560:
(((20,000,000 * 20 * 1) / 2) * 32 * 2) / 5,000,000 = 2560d
But when compiled, the value works out to be 842d or 34Ah so my loop breaks out too early.
The disassembly also confirms the literal 842 (34A) is compiled.
Why does the compiler not arrive at 2560 (A00h) please? I've probably done something daft but can't spot it.
Thank you.