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.

CC1350: Left shift of negative values in SIMPLELINK-CC13X0-SDK_3.20.00.23

Part Number: CC1350
Other Parts Discussed in Thread: SIMPLELINK-CC13X0-SDK

sys_ctrl.c:168: 

HWREGH( ADI3_BASE + ADI_O_MASK8B + ( ADI_3_REFSYS_O_DCDCCTL1 * 2 )) = (( ADI_3_REFSYS_DCDCCTL1_VDDR_TRIM_SLEEP_M << 8 ) |
      (( vddrTrimSleep << ADI_3_REFSYS_DCDCCTL1_VDDR_TRIM_SLEEP_S ) & ADI_3_REFSYS_DCDCCTL1_VDDR_TRIM_SLEEP_M ));

setup_rom.c:218:

HWREGH( ADI3_BASE + ADI_O_MASK8B + ( ADI_3_REFSYS_O_DCDCCTL1 * 2 )) = (( ADI_3_REFSYS_DCDCCTL1_VDDR_TRIM_SLEEP_M << 8 ) |
(( i32VddrSleepTrim << ADI_3_REFSYS_DCDCCTL1_VDDR_TRIM_SLEEP_S ) & ADI_3_REFSYS_DCDCCTL1_VDDR_TRIM_SLEEP_M ));

In both cases the values vddrTrimSleep and i32VddrSleepTrim can be negative. The code itself is safe due to ADI_3_REFSYS_DCDCCTL1_VDDR_TRIM_SLEEP_S being 0, but static analysis tools still flag these lines. It would be nice to get this fixed in the next release.