MISRA Discussion Forums
Rule 10.1 (DSP code) - Printable Version

+- MISRA Discussion Forums (https://forum.misra.org.uk)
+-- Forum: MISRA C (https://forum.misra.org.uk/forumdisplay.php?fid=4)
+--- Forum: MISRA-C: 2004 rules (https://forum.misra.org.uk/forumdisplay.php?fid=17)
+---- Forum: 6.10 Arithmetic Type Conversions (https://forum.misra.org.uk/forumdisplay.php?fid=37)
+---- Thread: Rule 10.1 (DSP code) (/showthread.php?tid=710)



Rule 10.1 (DSP code) - mshearer123 - 01-03-2010

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


Re: Rule 10.1 (DSP code) - jbezem - 02-03-2010

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


Re: Rule 10.1 (DSP code) - mshearer123 - 02-03-2010

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