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.

TMS320F280039C: warning #64-D: shift count is too large, for bitwise AND operation

Part Number: TMS320F280039C

How to implement a bitwise AND on 64bit variables on C2000 controllers?

Compilation of the following line results in "warning #64-D: shift count is too large" 

if (dev->sens_en_stat & (uint64_t)BMI2_EXT_SENS_SEL)
{
}

dev->sens_en_stat is uint64_t which is "typedef unsigned long long"

  • Solved. The issue was in the definition of BMI2_EXT_SENS_SEL

    #define BMI2_EXT_SENS_SEL                             (1 << BMI2_EXT_SENS_SYNC)

    the <1> must be converted to U64 

    #define BMI2_EXT_SENS_SEL                             (UINT64_C(1) << BMI2_EXT_SENS_SYNC)