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.

MISRA rule 12.8



Hello,

I am using CCSv5.5 and I am trygin to write to a register. I tried this the first time.

SYSReg2->STCCLKDIV = (0x1U << 24);

This threw a 10.5 warning, accoirding to MISRA checker. So I did this to fix it:

SYSReg2->STCCLKDIV = (((uint32_t)(0x1U)) << 24);

And it worked. The problem is that it is throwing me a 12.8 warning. Which is not possible because SYSReg2->STCCLKDIV is a uint32_t.

Is it a bug? I read somewhere that this was already fixed in 5.1 and newer versions.