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.

TMS320F28335:Misra 10.3 Problem - DELAY_US(A)

Part Number: TMS320F28335
Other Parts Discussed in Thread: C2000WARE

Hi all,


Checking MISRA C:2012 in test code.
I'm having a problem with the library function DELAY_US, asking for help.

// DO NOT MODIFY THIS LINE.
#define DELAY_US(A) DSP28x_usDelay(((((long double) A * 1000.0L) / (long double)CPU_RATE) - 9.0L) / 5.0L)
extern void DSP28x_usDelay(Uint32 Count);

A long double type variable is calculated and becomes a Uint32 Count.
Violating MISRA_C:2012 10.3 with this issue.
Any solution for this?

Add to,

Should I put an unsigned int variable or a long double variable at position A?