Because of the Thanksgiving holiday in the U.S., TI E2E™ design support forum responses may be delayed the week of November 23.

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.

F29H850TU: Negative numbers for IQNfrac() function

Part Number: F29H850TU

The __IQNfrac() macro is intended to return the signed fractional part of a fixed‑point number, including negative values. Per customer experience it seems the SDK function has an issue with handling the two’s-complement correctly. Could you verify whether this is a known limitation in version v1.02.01.00 and v26.00.00, and whether a fix can be incorporated in an upcoming release. 

If we pass in the number -0.25, the resulting fractional part is 0.75, but we would expect -0.25 to be the result. If we hand modify this function and run the setup values are as expected. The customer is using simulink to codegen the model so they are wondering if either there is more consideration that needs to be made when calling the _IQ20frac() function with a negative number or if the code in the SDK was just not intended to be used with a negative number. 

Thank you!