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-11-06 05:19 AM
Hello @Sune Jensen,
This issue has been fixed in our new MCSDK 6.3.2 release,
so feel free to download it here and try if it solved correctly your issue reported in this post.
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-11-06 05:19 AM
Hello @Sune Jensen,
This issue has been fixed in our new MCSDK 6.3.2 release,
so feel free to download it here and try if it solved correctly your issue reported in this post.