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.
Hi,

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

i.e.
Code:
*pSPI_FLG = 0x01;

however this generates a MISRA compliancy error.

what other way round this is there?

thanks for any help


matt
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.

FWIW,

Johan
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,

Matt