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!