2024-09-30 01:54 AM
[VERSION]: 6.3.1
[TOOL]: Firmware
[DETAILS]:
The implementation of MCM_Modulus defined in mc_math.h calls the CORDIC peripheral like this:
LL_CORDIC_WriteData(CORDIC, (((uint32_t)beta << 16U) | (uint32_t)alpha));
This works fine as long as alpha is positive. However, when converting a negative alpha from int16_t to uint32_t the upper 16 bits will all be '1', hence beta is overwritten.
[PROPOSED SOLUTION]:
Mask the upper bits of alpha before combining with beta.
LL_CORDIC_WriteData(CORDIC, (((uint32_t)beta << 16U) | ((uint32_t)alpha & 0xFFFF)));
Note: Images are attached that show calculated phase current using the wrong and the correct conversions respectively.
Solved! Go to Solution.
2024-09-30 07:34 AM
Hello @Sune Jensen,
Thank you for your problem report. A ticket has been entered on our side and notification will be done once corrected in further delivery.
2024-09-30 07:34 AM
Hello @Sune Jensen,
Thank you for your problem report. A ticket has been entered on our side and notification will be done once corrected in further delivery.