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.

TMS320F28377S: Saturation Function for CLA and unsigned long

Part Number: TMS320F28377S

I need to implement a saturation function (similar to _IQsat) in the CLA for an unsigned long variable.  It can be done with an if-then, but I've tried this, which is faster:

#define uint_Sat(Data, SatVal)    Data = (uint32_t)( __mminf32( (float32)Data, (float32)SatVal) );

where Data and SatVal are the input data and saturation / clamp value.  both are unsigned long variables.

I've tested this and it works, but am I missing something, or is there a dedicated intrinsic that will do what i want but I've overlooked.  

Thanks in advance for any insight.