MISRA Discussion Forums

Full Version: Rule 10.1 (DSP code)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

My code for running a blackfin DSP uses pointers to registers to set specific register values.

*pSPI_FLG = 0x01;

however this generates a MISRA compliancy error.

what other way round this is there?

thanks for any help

Depending on the definition of those pointers, your only option might be to define a general MISRA exception for access to those registers.
If you provide an example of the definition of one of those pointers, we can have a look if there's a coding alternative compliant with MISRA without issuing an exception.


Hi Johan,

thanks for the reply,
It looks like the issue was more with conversions of data i was trying to place into the register.
If i cast everything to the size of the register, it works fine.

thanks again,